-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Frost Ming <[email protected]>
- Loading branch information
Showing
7 changed files
with
602 additions
and
721 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,18 @@ | ||
ci: | ||
autoupdate_schedule: monthly | ||
repos: | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: 'v0.1.6' | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix, --show-fixes] | ||
- id: ruff-format | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.7.1 | ||
hooks: | ||
- id: mypy | ||
exclude: ^doc/src/.*\.py$ | ||
additional_dependencies: | ||
- pytest |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,12 @@ classifiers = [ | |
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11" | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
authors = [ | ||
{name = "sigma67", email = "[email protected]"}, | ||
{name = "Frost Ming", email = "[email protected]"}, | ||
] | ||
dependencies = [] | ||
requires-python = ">=3.8" | ||
|
@@ -45,52 +47,30 @@ package-dir = "src" | |
[tool.pdm.dev-dependencies] | ||
dev = [ | ||
"pdm>=2.8.0", | ||
"black>=23.7.0", | ||
"isort>=5.12.0", | ||
"pylint>=2.17.4", | ||
"mypy>=1.4.1", | ||
"pytest>=7.4.0", | ||
"pkginfo>=1.9.6", | ||
"pytest-cov>=4.1.0", | ||
"click>=8.1.6", | ||
"pre-commit>=3.5.0", | ||
] | ||
|
||
[tool.black] | ||
## black code formatter settings | ||
[tool.ruff] | ||
line-length = 120 | ||
|
||
|
||
[tool.isort] | ||
profile = "black" | ||
src_paths = ["src", "tests"] | ||
|
||
|
||
[tool.pylint] | ||
## pylint linter settings | ||
## see `pylint --generate-toml-config` | ||
## justify single line via: # pylint: disable=<rule> | ||
|
||
[tool.pylint.main] | ||
ignore-paths = [ | ||
".git", | ||
"__pypackages__", | ||
# "tests" # enable/disable linting within tests directory | ||
extend-select = [ | ||
"I", # isort | ||
"B", # flake8-bugbear | ||
"C4", # flake8-comprehensions | ||
"PGH", # pygrep-hooks | ||
"RUF", # ruff | ||
"W", # pycodestyle | ||
"YTT", # flake8-2020 | ||
] | ||
load-plugins = [ | ||
"pylint.extensions.docparams" | ||
] | ||
accept-no-param-doc="no" | ||
accept-no-raise-doc="no" | ||
accept-no-yields-doc="no" | ||
default-docstring-type="google" | ||
|
||
[tool.pylint.format] | ||
max-line-length = 120 | ||
extend-ignore = ["B018", "B019"] | ||
src = ["src"] | ||
target-version = "py38" | ||
|
||
[tool.pylint."messages control"] | ||
disable = [ | ||
"fixme" | ||
] | ||
[tool.ruff.mccabe] | ||
max-complexity = 10 | ||
|
||
[tool.mypy] | ||
## mypy static typechecker settings | ||
|
@@ -106,15 +86,13 @@ mypy_path = "src" | |
show_error_codes = true | ||
strict = true # https://mypy.readthedocs.io/en/stable/config_file.html#confval-strict | ||
|
||
|
||
[tool.pytest.ini_options] | ||
testpaths = ["tests"] | ||
addopts = "--verbose --cov --cov-report=term --cov-report=html --cov-report=xml --cov-config=pyproject.toml" | ||
|
||
|
||
[tool.coverage.run] | ||
branch = true | ||
source = ["src"] | ||
|
||
[tool.coverage.report] | ||
show_missing = true | ||
show_missing = true |
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