forked from rrthomas/hpmor
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add .ruff.toml and fix some findings
- Loading branch information
Showing
12 changed files
with
111 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
fix = true # auto-fix findings | ||
line-length = 88 # same as Black | ||
target-version = "py310" # Python 3.10 | ||
|
||
[lint] | ||
# comment this out to use only default rules (["E4", "E7", "E9", "F"]) | ||
select = ["ALL"] # activate all rules | ||
|
||
# add some more rules to include | ||
# extend-select = ["B", "Q", "E", "W"] | ||
|
||
# rule not to apply | ||
extend-ignore = [ | ||
"COM812", # missing-trailing-comma, | ||
"D200", # fits-on-one-line" | ||
"D211", # blank-line-before-class | ||
"D212", # multi-line-summary-second-line | ||
"ERA", # commented-out code | ||
"FIX002", # line-contains-todo | ||
"ISC001", # implicit-str-concat | ||
"PD901", # df name | ||
"PGH003", # blanket-type-ignore | ||
"RET504", # unnecessary-assign | ||
"T201", # print | ||
"TD002", # missing-todo-author | ||
"TD003", # missing-todo-link | ||
] | ||
|
||
|
||
[format] | ||
line-ending = "lf" # force lf | ||
preview = false # enable unstable preview style formatting |
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,4 +1,8 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# TODO: fix ruff findings | ||
# ruff: noqa | ||
|
||
""" | ||
Download chapter files from the web. | ||
""" | ||
|
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,4 +1,8 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# TODO: fix ruff findings | ||
# ruff: noqa | ||
|
||
""" | ||
Extract text from downloaded HTML files. | ||
""" | ||
|
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,4 +1,8 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# TODO: fix ruff findings | ||
# ruff: noqa | ||
|
||
""" | ||
Clean text. | ||
""" | ||
|
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,4 +1,8 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# TODO: fix ruff findings | ||
# ruff: noqa | ||
|
||
""" | ||
Cleanup LaTeX Code. | ||
""" | ||
|
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,15 +1,17 @@ | ||
""" | ||
Settings. | ||
lang: EN, DE, FR, ... | ||
raise_error: true -> script exits with error, used for autobuild of releases | ||
print_diff: true : print line of issues | ||
inline_fixing: modify the source file directly, USE WITH CAUTION | ||
""" | ||
|
||
settings = { | ||
"lang": "DE", | ||
"print_diff": True, | ||
"raise_error": True, | ||
"inline_fixing": False, | ||
} | ||
# ruff: # noqa: INP001 | ||
|
||
""" | ||
Settings. | ||
lang: EN, DE, FR, ... | ||
raise_error: true -> script exits with error, used for autobuild of releases | ||
print_diff: true : print line of issues | ||
inline_fixing: modify the source file directly, USE WITH CAUTION | ||
""" | ||
|
||
settings = { | ||
"lang": "DE", | ||
"print_diff": True, | ||
"raise_error": True, | ||
"inline_fixing": False, | ||
} |
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