Skip to content

Commit

Permalink
resolved ruff issues (initial round, with temporarily excluded rules)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaasRostock committed Oct 15, 2024
1 parent 3adada5 commit 364b180
Show file tree
Hide file tree
Showing 15 changed files with 458 additions and 400 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ files = [
"examples",
]
exclude = [
"^src/folder_to_be_excluded/",
"^src/mlfmu/fmu_build/cppfmu/",
]
check_untyped_defs = true
disable_error_code = [
Expand All @@ -118,7 +118,7 @@ include = [
"examples",
]
exclude = [
"src/folder_to_be_excluded",
"src/mlfmu/fmu_build/cppfmu",
]

typeCheckingMode = "basic"
Expand Down
31 changes: 16 additions & 15 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exclude = [
"dist",
"*cache",
"**/__pycache__",
"src/folder_to_be_excluded",
"src/mlfmu/fmu_build/cppfmu",
]
src = [
"src",
Expand All @@ -21,20 +21,21 @@ select = [
]
ignore = [
# Ruff lint rules temporarily ignored, but which should be reactivated and resolved in the future.
"E501", # Line length too long
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D202", # No blank lines allowed after function docstring
"D203", # 1 blank line required before class docstring
"D205", # 1 blank line required between summary line and description
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line
"N806", # Variable in function should be lowercase (uncomment if you want to allow Uppercase variable names in functions)
"E501", # Line length too long
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D202", # No blank lines allowed after function docstring
"D203", # 1 blank line required before class docstring
"D205", # 1 blank line required between summary line and description
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line
"N806", # Variable in function should be lowercase (uncomment if you want to allow Uppercase variable names in functions)
"TD002", # Missing <Author> in TODO comment <- @TODO: reactivate and resolve print statements @CLAROS, 2024-10-15
# Ruff lint rules considered as too strict and hence ignored
"ANN101", # Missing type annotation for `self` argument in instance methods (NOTE: also listed as deprecated by Ruff)
"ANN102", # Missing type annotation for `cls` argument in class methods (NOTE: also listed as deprecated by Ruff)
Expand Down
2 changes: 1 addition & 1 deletion src/mlfmu/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from pathlib import Path

MLFMU_PACKAGE_PATH = Path("").absolute().parent.parent
MLFMU_PACKAGE_PATH = Path().absolute().parent.parent
Loading

0 comments on commit 364b180

Please sign in to comment.