-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ruff for linting and formatting.
- Removed unused typing imports. - Renamed ambiguous variable. - Fix dict literal usage. - Ruff formatting. - Removed unnecessary trailing commas.
- Loading branch information
1 parent
91d2c35
commit 6c2d650
Showing
15 changed files
with
75 additions
and
77 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,34 @@ | ||
[tool.black] | ||
target-version = ['py36'] | ||
|
||
|
||
[tool.isort] | ||
# isort configuration that is compatible with Black. | ||
multi_line_output = 3 | ||
include_trailing_comma = true | ||
known_first_party = "ptpython" | ||
known_third_party = "prompt_toolkit,pygments,asyncssh" | ||
force_grid_wrap = 0 | ||
use_parentheses = true | ||
line_length = 88 | ||
[tool.ruff] | ||
target-version = "py37" | ||
select = [ | ||
"E", # pycodestyle errors | ||
"W", # pycodestyle warnings | ||
"F", # pyflakes | ||
"C", # flake8-comprehensions | ||
"T", # Print. | ||
"I", # isort | ||
# "B", # flake8-bugbear | ||
"UP", # pyupgrade | ||
"RUF100", # unused-noqa | ||
"Q", # quotes | ||
] | ||
ignore = [ | ||
"E501", # Line too long, handled by black | ||
"C901", # Too complex | ||
"E722", # bare except. | ||
] | ||
|
||
|
||
[tool.ruff.per-file-ignores] | ||
"examples/*" = ["T201"] # Print allowed in examples. | ||
"examples/ptpython_config/config.py" = ["F401"] # Unused imports in config. | ||
"ptpython/entry_points/run_ptipython.py" = ["T201", "F401"] # Print, import usage. | ||
"ptpython/entry_points/run_ptpython.py" = ["T201"] # Print usage. | ||
"ptpython/ipython.py" = ["T100"] # Import usage. | ||
"ptpython/repl.py" = ["T201"] # Print usage. | ||
"tests/run_tests.py" = ["F401"] # Unused imports. | ||
|
||
|
||
[tool.ruff.isort] | ||
known-first-party = ["ptpython"] | ||
known-third-party = ["prompt_toolkit", "pygments", "asyncssh"] |
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