This repository has been archived by the owner on Nov 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: fix issues found by
ruff
(#81)
### Summary of Changes * Remove configuration of `pylint` and `flake8` * Add configuration of `ruff` * Fix issues found by `ruff` --------- Co-authored-by: megalinter-bot <[email protected]>
- Loading branch information
1 parent
ce6aa35
commit 9d61efa
Showing
138 changed files
with
3,129 additions
and
3,734 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
ignore-init-module-imports = true | ||
line-length = 120 | ||
target-version = "py310" | ||
|
||
select = [ | ||
"F", | ||
"E", | ||
"W", | ||
"I", | ||
"N", | ||
"D", | ||
"UP", | ||
"YTT", | ||
"BLE", | ||
"FBT", | ||
"B", | ||
"A", | ||
"COM", | ||
"C4", | ||
"DTZ", | ||
"T10", | ||
"ISC", | ||
"ICN", | ||
"G", | ||
"INP", | ||
"PIE", | ||
"T20", | ||
"PYI", | ||
"PT", | ||
"Q", | ||
"RSE", | ||
"RET", | ||
"SLF", | ||
"SIM", | ||
"TID", | ||
"TCH", | ||
"INT", | ||
"ARG", | ||
"PTH", | ||
"ERA", | ||
"PGH", | ||
"PL", | ||
"TRY", | ||
"RUF" | ||
] | ||
ignore = [ | ||
# line-too-long (handled by black) | ||
"E501", | ||
# tab-indentation (handled by black) | ||
"W191", | ||
# trailing-whitespace (handled by black) | ||
"W291", | ||
# missing-newline-at-end-of-file (handled by black) | ||
"W292", | ||
# blank-line-with-witespace (handled by black) | ||
"W293", | ||
# boolean-positional-arg-in-function-definition (we leave it to the call-site) | ||
"FBT001", | ||
# boolean-default-value-in-function-definition (we leave it to the call-site) | ||
"FBT002", | ||
# builtin-attribute-shadowing (not an issue) | ||
"A003", | ||
# superfluous-else-return (sometimes it's more readable) | ||
"RET505", | ||
# superfluous-else-raise (sometimes it's more readable) | ||
"RET506", | ||
# superfluous-else-continue (sometimes it's more readable) | ||
"RET507", | ||
# superfluous-else-break (sometimes it's more readable) | ||
"RET508", | ||
# private-member-access (we cannot always avoid it if we want a clean API) | ||
"SLF001", | ||
# if-else-block-instead-of-if-exp (an if-else block can be more readable) | ||
"SIM108", | ||
# compare-to-empty-string (sometimes it's better to be explicit) | ||
"PLC1901", | ||
# too-many-return-statements | ||
"PLR0911", | ||
# too-many-branches | ||
"PLR0912", | ||
# too-many-arguments | ||
"PLR0913", | ||
# too-many-statements | ||
"PLR0915", | ||
# magic-value-comparison | ||
"PLR2004", | ||
# raise-vanilla-args | ||
"TRY003", | ||
] | ||
|
||
[per-file-ignores] | ||
"*test*.py" = [ | ||
# Undocumented declarations | ||
"D100", | ||
"D101", | ||
"D102", | ||
"D103", | ||
"D104", | ||
"D105", | ||
"D106", | ||
"D107", | ||
] | ||
|
||
[pydocstyle] | ||
convention = "numpy" |
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,6 @@ | ||
{ | ||
"extends": "stylelint-config-standard", | ||
"rules": { | ||
"selector-class-pattern": null | ||
} | ||
} |
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 |
---|---|---|
|
@@ -32,6 +32,9 @@ htmlcov/ | |
.coverage | ||
coverage.xml | ||
|
||
# ruff | ||
.ruff_cache/ | ||
|
||
# mkdocs | ||
/site/ | ||
/docs/reference/safeds/ | ||
|
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 @@ | ||
"""Utilities for creating an API reference.""" |
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 @@ | ||
"""Analysis of Python libraries and of code that uses them.""" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
"""The command line interface for the `library-analyzer`.""" | ||
|
||
from ._cli import cli | ||
|
||
__all__ = ["cli"] |
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.