-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2587 from cloudflare/hoodmane/python-lint
Add ruff.toml with Python lint configuration
- Loading branch information
Showing
15 changed files
with
147 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
target-version = "py312" | ||
|
||
[lint] | ||
select = [ | ||
"B0", # bugbear (all B0* checks enabled by default) | ||
"B904", # bugbear (Within an except clause, raise exceptions with raise ... from err) | ||
"B905", # bugbear (zip() without an explicit strict= parameter set.) | ||
"E", # pycodestyles | ||
"W", # pycodestyles | ||
"F", # pyflakes | ||
"I", # isort | ||
"PGH", # pygrep-hooks | ||
"PLC", # pylint conventions | ||
"PLE", # pylint errors | ||
"UP", # pyupgrade | ||
] | ||
ignore = [ | ||
"E402", # module import not at top of file | ||
"UP038", # Use X | Y in isinstance check instead of (X, Y) | ||
] | ||
|
||
[lint.per-file-ignores] | ||
# Want to preserve compatibility for old Python versions in tools directory so | ||
# disable pyupgrade. Oldest supported version is currently 3.9. | ||
"tools/*" = ["UP"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
from js import Response | ||
from langchain_core.prompts import PromptTemplate | ||
from langchain_openai import OpenAI | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.