-
-
Notifications
You must be signed in to change notification settings - Fork 567
chore(linters): Introduce ruff and fix issues #831
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
Merged
Merged
Changes from 14 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
7e1dd4f
chore(linters): Introduce ruff and fix issues
MaxymVlasov 9430c1a
Merge branch 'master' into introduce_ruff
MaxymVlasov 8dc8451
Apply review suggestions
MaxymVlasov 8c3d385
Address review suggestions
MaxymVlasov 53bb73f
Address review suggestions
MaxymVlasov 8831b60
decrease diff
MaxymVlasov 665d46c
Adress review comments
MaxymVlasov 87273be
Discard changes to tests/pytest/terraform_docs_replace_test.py
MaxymVlasov fa302b0
Discard changes to src/pre_commit_terraform/terraform_docs_replace.py
MaxymVlasov f74ef59
Disable ruff for deprecated hook
MaxymVlasov e3c1272
Discard changes to src/pre_commit_terraform/__main__.py
MaxymVlasov 71e794e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b309d69
Address review suggestions and DOC501
MaxymVlasov 948a36d
fix tests
MaxymVlasov 7765818
Merge branch 'master' into introduce_ruff
MaxymVlasov 51d9a93
Merge branch 'master' into introduce_ruff
MaxymVlasov bd24ee0
Merge branch 'master' into introduce_ruff
MaxymVlasov 8384a66
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 460031a
Merge branch 'master' into introduce_ruff
MaxymVlasov 49f5087
Merge branch 'master' into introduce_ruff
MaxymVlasov 593fe3d
Implement review suggestions and fix leftovers
MaxymVlasov 585571d
fix tests by reverting PTH120
MaxymVlasov 28aad2b
Merge branch 'master' into introduce_ruff
MaxymVlasov c6cd747
Discard changes to .gitignore
MaxymVlasov a6c9b5f
Address review suggestions regarding S404
MaxymVlasov 641399c
fix violations
MaxymVlasov 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 contains hidden or 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 hidden or 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,39 @@ | ||
# Assume Python 3.9 | ||
target-version = "py39" | ||
|
||
line-length = 79 # To decrease PR diff size | ||
|
||
namespace-packages = ["src/pre_commit_terraform/", "tests/pytest/"] | ||
|
||
[format] | ||
quote-style = "single" | ||
|
||
[lint.flake8-quotes] | ||
inline-quotes = "single" | ||
|
||
[lint.pydocstyle] | ||
convention = "pep257" | ||
|
||
[lint] | ||
select = ["ALL"] | ||
preview = true | ||
ignore = [ | ||
"CPY001", # Missing copyright notice at top of file | ||
] | ||
|
||
[lint.isort] | ||
# force-single-line = true # To decrease PR diff size | ||
lines-after-imports = 2 | ||
|
||
[lint.flake8-pytest-style] | ||
parametrize-values-type = "tuple" | ||
|
||
[lint.per-file-ignores] | ||
# Ignore in the `tests/` directory. | ||
"tests/**.py" = [ | ||
"S101", # Use of `assert` detected | ||
"PLC2701", # We need import marked as internal files for testing | ||
] | ||
|
||
"src/pre_commit_terraform/terraform_docs_replace.py" = ["ALL"] # Deprecated hook | ||
"tests/pytest/terraform_docs_replace_test.py" = ["ALL"] # Tests for deprecated hook | ||
MaxymVlasov marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.