-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ruff E through P #45
Merged
Merged
Ruff E through P #45
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
56f82cd
* E
bandophahita c2fe38e
* EM101
bandophahita b650fa3
* EM102
bandophahita b56c8e4
* F
bandophahita 1d0aa33
* FA
bandophahita 1f6daee
* I
bandophahita 8ee8b09
* PGH
bandophahita d909625
* PL
bandophahita 5153c94
* PT006
bandophahita dee903e
* PT007
bandophahita 104d68f
* PT011
bandophahita 8ee00c9
* PT018
bandophahita ebd1b71
* PT019
bandophahita 1fa94c3
* saving possible safe fixes
bandophahita 6688a94
fixing broken test after converting to using future annotations
bandophahita c0b87f0
update black & ruff
bandophahita File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -73,7 +73,7 @@ isort = {version = "*", optional = true} | |
mypy = {version = "*", optional = true} | ||
pre-commit = {version = "*", optional = true} | ||
pytest = {version = "*", optional = true} | ||
ruff = {version = "*", optional = true} | ||
ruff = {version = ">=0.2.0", optional = true} | ||
sphinx = {version = "*", optional = true} | ||
tox = {version = "*", optional = true} | ||
|
||
|
@@ -107,6 +107,14 @@ build-backend = "poetry.core.masonry.api" | |
[tool.ruff] | ||
target-version = "py38" # minimum supported version | ||
line-length = 88 # same as Black. | ||
|
||
extend-exclude = [ | ||
"screenpy_selenium/__init__.py", | ||
"screenpy_selenium/__version__.py", | ||
"docs", | ||
] | ||
|
||
[tool.ruff.lint] | ||
select = [ | ||
"A", # flake8-builtins | ||
"ANN", # flake8-annotations # coming back to this one later to compare against mypy | ||
|
@@ -115,21 +123,21 @@ select = [ | |
"BLE", # flake8-blind-except | ||
"C4", # flake8-comprehensions | ||
"D", # pydocstyle | ||
# "E", # pycodestyle error | ||
# "EM", # flake8-errmsg | ||
# "ERA", # eradicate | ||
# "F", # Pyflakes | ||
# "FA", # flake8-future-annotations | ||
"E", # pycodestyle error | ||
"EM", # flake8-errmsg | ||
"ERA", # eradicate | ||
"F", # Pyflakes | ||
"FA", # flake8-future-annotations | ||
# "FBT", # flake8-boolean-trap | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. purposefully skipping FBT for this PR. Will be addressed in it's own at the end. |
||
# "FIX", # flake8-fixme | ||
# "FLY", # flynt | ||
# "I", # isort | ||
# "ICN", # flake8-import-conventions | ||
# "ISC", # flake8-implicit-str-concat | ||
# "PGH", # pygrep-hooks | ||
# "PIE", # flake8-pie | ||
# "PL", # pylint | ||
# "PT", # flake8-pytest-style | ||
"FIX", # flake8-fixme | ||
"FLY", # flynt | ||
"I", # isort | ||
"ICN", # flake8-import-conventions | ||
"ISC", # flake8-implicit-str-concat | ||
"PGH", # pygrep-hooks | ||
"PIE", # flake8-pie | ||
"PL", # pylint | ||
"PT", # flake8-pytest-style | ||
# "Q", # flake8-quotes | ||
# "RET", # flake8-return | ||
# "RSE", # flake8-raise | ||
|
@@ -153,20 +161,20 @@ ignore = [ | |
"ANN101", # missing self annotation, we only annotate self when we return it. | ||
"ANN102", # missing cls annotation, we only annotate cls when we return it. | ||
] | ||
exclude = [ | ||
"screenpy_selenium/__init__.py", | ||
"screenpy_selenium/__version__.py", | ||
"docs", | ||
] | ||
|
||
|
||
[tool.ruff.lint] | ||
extend-safe-fixes = [ | ||
"EM101", | ||
"EM102", | ||
# "TCH001", "TCH002", "TCH003", "TCH004", | ||
# "SIM108" | ||
# maybe? | ||
# "F841", | ||
"C419", | ||
"D200", "D205", "D415", | ||
"PT003", "PT006", "PT018", | ||
] | ||
|
||
[tool.ruff.per-file-ignores] | ||
[tool.ruff.lint.per-file-ignores] | ||
"tests/**" = [ | ||
"D", # we don't need public-API-polished docstrings in tests. | ||
"FBT", # using a boolean as a test object is useful! | ||
|
@@ -176,20 +184,30 @@ extend-safe-fixes = [ | |
"FA100", # we are purposely testing pacing without future annotations. | ||
] | ||
|
||
|
||
[tool.ruff.isort] | ||
[tool.ruff.lint.isort] | ||
combine-as-imports = true | ||
split-on-trailing-comma = true | ||
known-first-party = ["screenpy_selenium", "tests"] | ||
|
||
|
||
[tool.ruff.flake8-pytest-style] | ||
[tool.ruff.lint.flake8-pytest-style] | ||
mark-parentheses = false | ||
|
||
|
||
[tool.ruff.pycodestyle] | ||
[tool.ruff.lint.pycodestyle] | ||
ignore-overlong-task-comments = true | ||
|
||
|
||
[tool.ruff.pydocstyle] | ||
[tool.ruff.lint.pydocstyle] | ||
convention = "google" | ||
|
||
|
||
[tool.isort] | ||
line_length = 88 | ||
multi_line_output = 3 | ||
include_trailing_comma = true | ||
use_parentheses = true | ||
combine_as_imports = true | ||
|
||
skip = [".idea", ".tox", "docs"] | ||
src_paths = ["screenpy_selenium","tests"] |
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
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What necessitated this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new rule changes in the pyproject.toml occurred at that version.
[tool.ruff.lint.***]