File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ Release notes for the Flare Platform can be found on the [product documentation
118118``` python
119119from flareio import FlareApiClient
120120
121+
121122client = FlareApiClient.from_env()
122123```
123124
Original file line number Diff line number Diff line change @@ -97,8 +97,6 @@ These are end-to-end examples in various programming languages.
9797
9898<Accordion title = " Python SDK Example" >
9999``` python
100- import time
101-
102100from flareio import FlareApiClient
103101from flareio.ratelimit import Limiter
104102
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ export FLARE_TENANT_ID="<tenant-id>"
5151``` python
5252from flareio import FlareApiClient
5353
54+
5455client = FlareApiClient.from_env()
5556
5657resp = client.get(" /tokens/test" )
Original file line number Diff line number Diff line change @@ -41,3 +41,8 @@ combine-as-imports = true
4141forced-separate = [
4242 " typing" ,
4343]
44+
45+ [tool .ty .analysis ]
46+ allowed-unresolved-imports = [
47+ " taxii2client.**" ,
48+ ]
Original file line number Diff line number Diff line change @@ -80,7 +80,6 @@ def _lint_mdx_file_code_blocks(
8080 args = [
8181 lint_context .ty_path ,
8282 "check" ,
83- "--ignore=unresolved-import" ,
8483 f .name ,
8584 ],
8685 )
@@ -90,7 +89,25 @@ def _lint_mdx_file_code_blocks(
9089 message = ex .stdout .decode (),
9190 )
9291
93- # Run ruff check
92+ # Ruff: check
93+ try :
94+ subprocess .check_output (
95+ args = [
96+ lint_context .ruff_path ,
97+ "check" ,
98+ "--diff" ,
99+ "--stdin-filename" ,
100+ filename ,
101+ ],
102+ input = python_block .body .encode ("utf-8" ),
103+ )
104+ except subprocess .CalledProcessError as ex :
105+ yield LintError (
106+ filename = filename ,
107+ message = ex .stdout .decode (),
108+ )
109+
110+ # Ruff: format check
94111 try :
95112 subprocess .check_output (
96113 args = [
You can’t perform that action at this time.
0 commit comments