Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#56)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/hhatto/autopep8: v2.1.0 → v2.3.1](hhatto/autopep8@v2.1.0...v2.3.1)
- [github.com/tox-dev/pyproject-fmt: 1.8.0 → 2.2.1](tox-dev/pyproject-fmt@1.8.0...2.2.1)
- [github.com/google/yamlfmt: v0.12.1 → v0.13.0](google/yamlfmt@v0.12.1...v0.13.0)
- [github.com/asottile/reorder-python-imports: v3.12.0 → v3.13.0](asottile/reorder-python-imports@v3.12.0...v3.13.0)
- [github.com/asottile/pyupgrade: v3.15.2 → v3.17.0](asottile/pyupgrade@v3.15.2...v3.17.0)
- [github.com/astral-sh/ruff-pre-commit: v0.4.3 → v0.6.4](astral-sh/ruff-pre-commit@v0.4.3...v0.6.3)
- [github.com/pre-commit/mirrors-mypy: v1.10.0 → v1.11.2](pre-commit/mirrors-mypy@v1.10.0...v1.11.2)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Sep 7, 2024
1 parent 209b946 commit 1453c6d
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 58 deletions.
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ repos:
hooks:
- id: autoflake
- repo: https://github.com/hhatto/autopep8
rev: v2.1.0
rev: v2.3.1
hooks:
- id: autopep8
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "1.8.0"
rev: "2.2.1"
hooks:
- id: pyproject-fmt
- repo: https://github.com/google/yamlfmt
rev: "v0.12.1"
rev: "v0.13.0"
hooks:
- id: yamlfmt
args:
Expand All @@ -60,7 +60,7 @@ repos:
- mdformat-footnote

- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
rev: v3.13.0
hooks:
- id: reorder-python-imports
args: [--py39-plus]
Expand All @@ -69,7 +69,7 @@ repos:
hooks:
- id: add-trailing-comma
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py39-plus]
Expand All @@ -78,10 +78,10 @@ repos:
hooks:
- id: docformatter
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.3"
rev: "v0.6.4"
hooks:
- id: ruff
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
rev: v1.11.2
hooks:
- id: mypy
91 changes: 42 additions & 49 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ description = "A low-fat task runner."
readme = "README.md"
license = "ISC"
maintainers = [
{ name = "Nikita Karamov", email = "[email protected]" },
{ name = "Nikita Karamov", email = "[email protected]" },
]
authors = [
{ name = "Nikita Karamov", email = "[email protected]" },
{ name = "Nikita Karamov", email = "[email protected]" },
]
requires-python = ">=3.9"
classifiers = [
Expand All @@ -40,11 +40,9 @@ dynamic = [
]
dependencies = [
]
[project.urls]
Issues = "https://github.com/kytta/skyr/issues"
Source = "https://github.com/kytta/skyr"
[project.scripts]
skyr = "skyr:main"
urls.Issues = "https://github.com/kytta/skyr/issues"
urls.Source = "https://github.com/kytta/skyr"
scripts.skyr = "skyr:main"

[tool.setuptools_scm]

Expand All @@ -60,64 +58,59 @@ dependencies = [

[tool.hatch.envs.default.scripts]
test = [
"pytest {args:tests}",
"pytest {args:tests}",
]
cov = [
"coverage erase",
"coverage run -m pytest {args:tests}",
"coverage report",
"coverage xml"
"coverage erase",
"coverage run -m pytest {args:tests}",
"coverage report",
"coverage xml",
]

[[tool.hatch.envs.test.matrix]]
python = ["39", "310", "311", "312"]
python = [ "39", "310", "311", "312" ]

[tool.autopep8]
ignore = ["W503"]
ignore = [ "W503" ]

[tool.ruff]
line-length = 79
target-version = "py39"

select = [
"F", # pyflakes
"E", "W", # pycodestyle
"C90", # mccabe
"N", # pep8-naming
"S", # bandit
"BLE", # flake8-blind-except
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"EM", # flake8-errmsg
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"PIE", # flake8-pie
"T20", # flake8-print
"Q", # flake8-quotes
"RET", # flake8-return
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PL", # pylint
"TRY", # tryceratops
"RUF", # ruff
]


[tool.ruff.mccabe]
max-complexity = 10
line-length = 79

[tool.ruff.flake8-quotes]
inline-quotes = "double"
lint.select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"C90", # mccabe
"DTZ", # flake8-datetimez
"E",
"EM", # flake8-errmsg
"ERA", # eradicate
"F", # pyflakes
"FBT", # flake8-boolean-trap
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PIE", # flake8-pie
"PL", # pylint
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"RET", # flake8-return
"RUF", # ruff
"S", # bandit
"SIM", # flake8-simplify
"T20", # flake8-print
"TRY", # tryceratops
"W", # pycodestyle
]

[tool.pytest.ini_options]
addopts = "--tb=short --showlocals"

[tool.coverage.run]
plugins = ["covdefaults"]
plugins = [ "covdefaults" ]

[tool.mypy]
python_version = 3.9
Expand All @@ -129,7 +122,7 @@ warn_redundant_casts = true
warn_unused_ignores = true

[[tool.mypy.overrides]]
module = ["tests.*"]
module = [ "tests.*" ]
ignore_missing_imports = true
check_untyped_defs = false
disallow_incomplete_defs = false
Expand Down
1 change: 1 addition & 0 deletions tests/ruff.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
extend ="../pyproject.toml"

[lint]
extend-select = [
"PT", # flake8-pytest-style
]
Expand Down
4 changes: 2 additions & 2 deletions tests/skyr_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ def test_successful_execution(
with monkeypatch.context() as m:
m.chdir(Path(__file__).parent / "assets")

stdout = subprocess.check_output(
[sys.executable, "-m", "skyr", *argv], # noqa: S603
stdout = subprocess.check_output( # noqa: S603
[sys.executable, "-m", "skyr", *argv],
)

assert expected_out in stdout

0 comments on commit 1453c6d

Please sign in to comment.