Skip to content

Commit

Permalink
[MAJOR] Swapped boolean parameters to enums
Browse files Browse the repository at this point in the history
  • Loading branch information
Diapolo10 committed Aug 16, 2024
1 parent 026de34 commit ee8de84
Show file tree
Hide file tree
Showing 9 changed files with 324 additions and 264 deletions.
184 changes: 102 additions & 82 deletions poetry.lock

Large diffs are not rendered by default.

141 changes: 75 additions & 66 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,26 +72,26 @@ python = "^3.9.0"


[tool.poetry.group.dev.dependencies]
mypy = "^1.6.1"
mypy = "^1.8.0"


[tool.poetry.group.linters]
optional = true


[tool.poetry.group.linters.dependencies]
ruff = ">=0.5.0,<0.6.0"
ruff = "^0.6.0"


[tool.poetry.group.tests]
optional = true


[tool.poetry.group.tests.dependencies]
pytest = ">=7.4.3,<9.0.0"
pytest-cov = ">=4.1,<6.0"
tox = "^4.11.3"
tox-gh-actions = "^3.1.3"
pytest = "^8.0.0"
pytest-cov = "^5.0.0"
tox = "^4.12.1"
tox-gh-actions = "^3.2.0"


[tool.poetry.urls]
Expand All @@ -116,97 +116,106 @@ testpaths = [


[tool.ruff]
select = [
"A", # Builtins
"ANN", # Annotations
"ARG", # Unused arguments
"B", # Bugbear
"BLE", # Blind except
"C4", # Comprehensions
"C90", # mccabe
"COM", # Commas
"D1", # Undocumented public elements
"D2", # Docstring conventions
"D3", # Triple double quotes
"D4", # Docstring text format
"DTZ", # Datetimes
"EM", # Error messages
"ERA", # Commented-out code
"EXE", # Executable
"F", # Pyflakes
"FA", # __future__ annotations
"FLY", # F-strings
# "FURB", # Refurb
"G", # Logging format
"I", # Isort
"ICN", # Import conventions
"INP", # Disallow PEP-420 (Implicit namespace packages)
"INT", # gettext
"ISC", # Implicit str concat
# "LOG", # Logging
"N", # PEP-8 Naming
"NPY", # Numpy
"PERF", # Unnecessary performance costs
"PGH", # Pygrep hooks
"PIE", # Unnecessary code
"PL", # Pylint
"PT", # Pytest
"PTH", # Use Pathlib
"PYI", # Stub files
"Q", # Quotes
"RET", # Return
"RUF", # Ruff
"RSE", # Raise
"S", # Bandit
"SIM", # Code simplification
"SLF", # Private member access
"SLOT", # __slots__
"T10", # Debugger
"T20", # Print
"TCH", # Type checking
"TID", # Tidy imports
"TRY", # Exception handling
"UP", # Pyupgrade
"W", # Warnings
"YTT", # sys.version
lint.select = [
"A", # Builtins
"ANN", # Annotations
"ARG", # Unused arguments
"ASYNC", # Asynchronous code
"B", # Bugbear
"BLE", # Blind except
"C4", # Comprehensions
"C90", # mccabe
"COM", # Commas
# "CPY", # Copyright
"D1", # Undocumented public elements
"D2", # Docstring conventions
"D3", # Triple double quotes
"D4", # Docstring text format
"DTZ", # Datetimes
"E", # Errors
"EM", # Error messages
"ERA", # Commented-out code
"EXE", # Executable
"F", # Pyflakes
"FA", # __future__ annotations
"FBT", # "Boolean trap"
"FIX", # "FIXME"-comments
"FLY", # F-strings
# "FURB", # Refurb
"G", # Logging format
"I", # Isort
"ICN", # Import conventions
"INP", # Disallow PEP-420 (Implicit namespace packages)
"INT", # gettext
"ISC", # Implicit str concat
"LOG", # Logging
"N", # PEP-8 Naming
"PERF", # Unnecessary performance costs
"PGH", # Pygrep hooks
"PIE", # Unnecessary code
"PL", # Pylint
"PT", # Pytest
"PTH", # Use Pathlib
"PYI", # Stub files
"Q", # Quotes
"RET", # Return
"RUF", # Ruff
"RSE", # Raise
"S", # Bandit
"SIM", # Code simplification
"SLF", # Private member access
"SLOT", # __slots__
"T10", # Debugger
"T20", # Print
"TCH", # Type checking
"TD", # "TODO"-comments
"TID", # Tidy imports
"TRY", # Exception handling
"UP", # Pyupgrade
"W", # Warnings
"YTT", # sys.version
]
ignore = [
lint.ignore = [
"ANN101", # Type annotation for `self`
"D203", # One blank line before class docstring
"D212", # Multi-line summary first line
"PLR0913", # Too many arguments
"Q000", # Single quotes found but double quotes preferred
]
ignore-init-module-imports = true
line-length = 120
# preview = true
show-fixes = true
src = ["src",]
target-version = "py39"


[tool.ruff.flake8-quotes]
[tool.ruff.lint.flake8-copyright]
author = "Lari Liuhamo"


[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
multiline-quotes = "double"


[tool.ruff.mccabe]
[tool.ruff.lint.mccabe]
max-complexity = 10


[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
# https://beta.ruff.rs/docs/rules/
"__init__.py" = ["F401", "F403", "F405",]
"tests/*" = ["ANN", "ARG", "INP001", "S101",]


[tool.ruff.pylint]
[tool.ruff.lint.pylint]
max-args = 15
max-branches = 20
max-returns = 10
max-statements = 80


[tool.ruff.flake8-tidy-imports]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"


Expand Down
Loading

0 comments on commit ee8de84

Please sign in to comment.