-
Notifications
You must be signed in to change notification settings - Fork 30
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
chore: switch to ruff format
over black
#765
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
26d1927
chore: bump ruff and use for formatting
willmurphyscode 19ad83f
chore: commit result of ruff format src test
willmurphyscode 7101036
rename black precommit hook to format
willmurphyscode cce4db8
chore: lints pass with only ruff governing line length
willmurphyscode c319f04
chore: remove black
willmurphyscode b63c198
chore: clean up stray comment
willmurphyscode c0e2bea
chore: regenerate poetry.lock
willmurphyscode 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 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
|
@@ -63,7 +63,6 @@ zstandard = ">=0.22,<0.24" | |
[tool.poetry.group.dev.dependencies] | ||
pytest = ">=7.2.2,<9.0.0" | ||
pre-commit = ">=3.2,<5.0" | ||
black = ">=23.1,<25.0" | ||
jsonschema = "^4.17.3" | ||
pytest-unordered = ">=0.5.2,<0.7.0" | ||
pytest-sugar = ">=0.9.6,<1.1.0" | ||
|
@@ -77,7 +76,7 @@ types-requests = "^2.28.11.7" | |
mypy = "^1.1" | ||
radon = ">=5.1,<7.0" | ||
dunamai = "^1.15.0" | ||
ruff = ">=0.5.1,<0.9.2" | ||
ruff = "^0.9.2" | ||
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. confirmed v0.9.2 is latest from 5 days ago |
||
yardstick = {git = "https://github.com/anchore/yardstick", rev = "dd0410273860e765386bc29046cb26dd9d5fda8c"} | ||
# yardstick = {path = "../yardstick", develop=true } | ||
tabulate = "0.9.0" | ||
|
@@ -123,32 +122,27 @@ exclude = '''(?x)( | |
| ^tests/.*$ # any tests | ||
)''' | ||
|
||
[tool.black] | ||
line-length = 130 | ||
exclude = ''' | ||
( | ||
/( | ||
\.eggs # exclude a few common directories in the | ||
| \.git # root of the project | ||
| \.hg | ||
| \.mypy_cache | ||
| \.tox | ||
| \.venv | ||
| _build | ||
| buck-out | ||
| build | ||
| dist | ||
| data | ||
| backup | ||
| src/vunnel/providers/mariner/model # files in here are generated | ||
| tests/quality/vulnerability-match-labels | ||
| tests/quality/.yardstick | ||
| tests/quality/data | ||
| tests/quality/build | ||
| tests/quality/bin | ||
)/ | ||
) | ||
''' | ||
[tool.ruff.format] | ||
exclude = [ | ||
".eggs", # exclude a few common directories in the | ||
".git", # root of the project | ||
".hg", | ||
".mypy_cache", | ||
".tox", | ||
".venv", | ||
"_build", | ||
"buck-out", | ||
"build", | ||
"dist", | ||
"data", | ||
"backup", | ||
"src/vunnel/providers/mariner/model", # files in here are generated | ||
"tests/quality/vulnerability-match-labels", | ||
"tests/quality/.yardstick", | ||
"tests/quality/data", | ||
"tests/quality/build", | ||
"tests/quality/bin", | ||
] | ||
|
||
[tool.coverage.run] | ||
omit = [ | ||
|
@@ -172,7 +166,6 @@ dirty = true | |
|
||
[tool.ruff] | ||
cache-dir = ".cache/ruff" | ||
# allow for a wide-birth relative to what black will correct to | ||
line-length = 150 | ||
|
||
extend-exclude = [ | ||
|
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.
Good change to generalize this rather than use the tool name