Skip to content

Commit

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

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.4 → v0.5.0](astral-sh/ruff-pre-commit@v0.4.4...v0.5.0)
- [github.com/adamchainz/blacken-docs: 1.16.0 → 1.18.0](adamchainz/blacken-docs@1.16.0...1.18.0)
- [github.com/tox-dev/pyproject-fmt: 2.0.4 → 2.1.3](tox-dev/pyproject-fmt@2.0.4...2.1.3)

* Update Pyproject formatting

* Reformat remove 3.9 upstream tests

* Add new Zarr requirement

* More new Zarr requirements

* Gahh, even more new Zarr requirements

* Remove Zarr from upstream tests and pin to less than 3

* Fully remove upstream Zarr line

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Kerney <abk@mac.com>
  • Loading branch information
pre-commit-ci[bot] and abkfenris authored Jul 2, 2024
1 parent 421cc08 commit 11e36d7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 50 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
pydantic-version: ["<2", ">=2"]
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4

Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
- id: double-quote-string-fixer

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.4"
rev: "v0.5.0"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -23,7 +23,7 @@ repos:
- mdformat-myst

- repo: https://github.com/adamchainz/blacken-docs
rev: "1.16.0"
rev: "1.18.0"
hooks:
- id: blacken-docs
additional_dependencies:
Expand All @@ -43,7 +43,7 @@ repos:
- markdown # managed by mdformat

- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.0.4"
rev: "2.1.3"
hooks:
- id: pyproject-fmt

Expand Down
77 changes: 32 additions & 45 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,58 +65,57 @@ skip-string-normalization = true
[tool.ruff]
line-length = 100

[tool.ruff.lint]
select = [
lint.select = [
"B", # flake8-bugbear
"C",
'D', # pydocstyle
"E", # pycodestyle
"F", # Pyflakes
"I", # isort
"W", # pycodestyle
# "T4",
"B9",
"C",
"D", # pydocstyle
"E", # pycodestyle
"F", # Pyflakes
"I", # isort
"W", # pycodestyle
]
ignore = [
lint.ignore = [
"C901",
"D100", # Missing docstring in public module
"D107", # Missing docstring in `__init__`
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
"E402",
# "E203",
# "E266",
"E501",
# "W503",
"E722",
"E402",
"C901",
]
exclude = [
"tests/",
lint.exclude = [
"docs/",
"tests/",
]

[tool.ruff.lint.per-file-ignores]
"tests/*" = [
lint.per-file-ignores."docs/*" = [
"D101", # missing docstring in public class
"D102", # missing docstring in public method
"D103", # missing docstring in public function
]
lint.per-file-ignores."tests/*" = [
"D103", # Missing docstring in public function
"D205", # blank line between summary and description
"D415", # first line should end with punctuation
]
"docs/*" = [
"D101", # missing docstring in public class
"D102", # missing docstring in public method
"D103", # missing docstring in public function
# Allow fastapi.Depends and other dependency injection style function arguments
lint.flake8-bugbear.extend-immutable-calls = [
"fastapi.Depends",
"fastapi.Path",
"fastapi.Query",
]

[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 18

[tool.ruff.lint.isort]
combine-as-imports = true
known-first-party = [
lint.flake8-quotes.docstring-quotes = "double"
lint.flake8-quotes.inline-quotes = "single"
lint.isort.combine-as-imports = true
lint.isort.known-first-party = [
"xpublish",
]
known-third-party = [
lint.isort.known-third-party = [
"cachey",
"dask",
"fastapi",
Expand All @@ -134,22 +133,10 @@ known-third-party = [
"xarray",
"zarr",
]

[tool.ruff.lint.pydocstyle]
# Unlike Flake8, default to a complexity level of 10.
lint.mccabe.max-complexity = 18
# Use Google style docstrings
convention = "google"

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

[tool.ruff.lint.flake8-bugbear]
# Allow fastapi.Depends and other dependency injection style function arguments
extend-immutable-calls = [
"fastapi.Depends",
"fastapi.Query",
"fastapi.Path",
]
lint.pydocstyle.convention = "google"

[tool.pytest.ini_options]
log_cli = true
Expand Down

0 comments on commit 11e36d7

Please sign in to comment.