Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changelog/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ Release notes for the Flare Platform can be found on the [product documentation
```python
from flareio import FlareApiClient


client = FlareApiClient.from_env()
```

Expand Down
2 changes: 0 additions & 2 deletions docs/guides/tenant-events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ These are end-to-end examples in various programming languages.

<Accordion title="Python SDK Example">
```python
import time

from flareio import FlareApiClient
from flareio.ratelimit import Limiter

Expand Down
1 change: 1 addition & 0 deletions docs/sdk/python.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export FLARE_TENANT_ID="<tenant-id>"
```python
from flareio import FlareApiClient


client = FlareApiClient.from_env()

resp = client.get("/tokens/test")
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,8 @@ combine-as-imports = true
forced-separate = [
"typing",
]

[tool.ty.analysis]
allowed-unresolved-imports = [
"taxii2client.**",
]
21 changes: 19 additions & 2 deletions src/lintlify/linters/code_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ def _lint_mdx_file_code_blocks(
args=[
lint_context.ty_path,
"check",
"--ignore=unresolved-import",
f.name,
],
)
Expand All @@ -90,7 +89,25 @@ def _lint_mdx_file_code_blocks(
message=ex.stdout.decode(),
)

# Run ruff check
# Ruff: check
try:
subprocess.check_output(
args=[
lint_context.ruff_path,
"check",
"--diff",
"--stdin-filename",
filename,
],
input=python_block.body.encode("utf-8"),
)
except subprocess.CalledProcessError as ex:
yield LintError(
filename=filename,
message=ex.stdout.decode(),
)

# Ruff: format check
try:
subprocess.check_output(
args=[
Expand Down