Skip to content

[pre-commit.ci] pre-commit autoupdate #424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: detect-private-key
Expand All @@ -24,34 +24,34 @@ repos:
- --markdown-linebreak-ext=md

- repo: https://github.com/MarcoGorelli/auto-walrus
rev: v0.2.2
rev: 0.3.4
hooks:
- id: auto-walrus

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.2
rev: v0.11.8
hooks:
- id: ruff # See pyproject.toml for args
# args: [--fix, --exit-non-zero-on-fix]

- repo: https://github.com/psf/black
rev: 24.2.0
rev: 25.1.0
hooks:
- id: black # See pyproject.toml for args

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.4.1
hooks:
- id: codespell # See pyproject.toml for args
additional_dependencies:
- tomli

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.7.0
rev: v2.5.1
hooks:
- id: pyproject-fmt

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.16
rev: v0.24.1
hooks:
- id: validate-pyproject
8 changes: 4 additions & 4 deletions BWBImportBot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env python

"""
__init__.py
~~~~~~~~~~~
:copyright: (c) 2020 by Internet Archive.
:license: AGPL v3
__init__.py
~~~~~~~~~~~
:copyright: (c) 2020 by Internet Archive.
:license: AGPL v3
"""

__title__ = "bwbimportbot"
Expand Down
8 changes: 4 additions & 4 deletions ia-bulkmarc-bot/bulk-import.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env python3

"""
Iterates over an archive.org bulk MARC item, such as OpenLibraries-Trent-MARCs,
and imports all records in all of its MARC files to Open Library.
Iterates over an archive.org bulk MARC item, such as OpenLibraries-Trent-MARCs,
and imports all records in all of its MARC files to Open Library.

USAGE: ./bulk-import.py <archive.org item id>
USAGE: ./bulk-import.py <archive.org item id>

Logs results to STDOUT
Logs results to STDOUT
"""

import argparse
Expand Down
61 changes: 28 additions & 33 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
[tool.ruff]
target-version = "py37"

line-length = 616
select = [
"C4", # flake8-comprehensions
"C90", # mccabe
"E", # pycodestyle
"F", # Pyflakes
"I", # isort
"ICN", # flake8-import-conventions
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PLC", # Pylint conventions
"PLE", # Pylint errors
"PLR091", # Pylint refactor just for max-args, max-branches, etc.
"PYI", # flake8-pyi
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"T10", # flake8-debugger
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle
"YTT", # flake8-2020
"C4", # flake8-comprehensions
"C90", # mccabe
"E", # pycodestyle
"F", # Pyflakes
"I", # isort
"ICN", # flake8-import-conventions
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PLC", # Pylint conventions
"PLE", # Pylint errors
"PLR091", # Pylint refactor just for max-args, max-branches, etc.
"PYI", # flake8-pyi
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"T10", # flake8-debugger
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle
"YTT", # flake8-2020
]
ignore = [
"E402",
Expand All @@ -31,19 +34,11 @@ ignore = [
"PLC1901",
"RUF001",
]
line-length = 616
target-version = "py37"

[tool.ruff.mccabe]
max-complexity = 21

[tool.ruff.pylint]
max-args = 8
max-branches = 18
max-statements = 73

[tool.ruff.per-file-ignores]
"test/*" = ["S101"]
per-file-ignores."test/*" = [ "S101" ]
pylint.max-args = 8
pylint.max-branches = 18
pylint.max-statements = 73
mccabe.max-complexity = 21

[tool.codespell]
ignore-words-list = 'didnt'
Expand Down
Loading