diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 245d099..5ca3803 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,12 +25,17 @@ repos: - id: "trailing-whitespace" - repo: "https://github.com/asottile/pyupgrade" - rev: "v3.18.0" + rev: "v3.19.0" hooks: - id: "pyupgrade" name: "Enforce Python 3.9+ idioms" args: ["--py39-plus"] + - repo: "https://github.com/sirosen/slyp" + rev: "0.8.1" + hooks: + - id: "slyp" + - repo: "https://github.com/psf/black-pre-commit-mirror" rev: "24.10.0" hooks: @@ -59,6 +64,11 @@ repos: - id: "check-dependabot" - id: "check-readthedocs" + - repo: "https://github.com/rhysd/actionlint" + rev: "v1.7.3" + hooks: + - id: "actionlint" + - repo: "https://github.com/kurtmckee/pre-commit-hooks" rev: "v0.1.1" hooks: diff --git a/pyproject.toml b/pyproject.toml index 8447ecc..1c8bcb1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,6 +59,16 @@ strict = true sqlite_cache = true +# pytest +# ------ + +[tool.pytest.ini_options] +addopts = "--color=yes" +filterwarnings = [ + "error", +] + + # scriv # ----- @@ -81,13 +91,3 @@ fragment_directory = "changelog.d" insert_marker = "scriv-insert-here" main_branches = ["main", "releases"] new_fragment_template = "file: fragment-template.rst.txt" - - -# pytest -# ------ - -[tool.pytest.ini_options] -addopts = "--color=yes" -filterwarnings = [ - "error", -] diff --git a/requirements/docs/requirements.txt b/requirements/docs/requirements.txt index 5b58a5a..2aca30d 100644 --- a/requirements/docs/requirements.txt +++ b/requirements/docs/requirements.txt @@ -8,7 +8,7 @@ idna==3.10 ; python_version >= "3.9" imagesize==1.4.1 ; python_version >= "3.9" importlib-metadata==8.5.0 ; python_version < "3.10" and python_version >= "3.9" jinja2==3.1.4 ; python_version >= "3.9" -markupsafe==3.0.1 ; python_version >= "3.9" +markupsafe==3.0.2 ; python_version >= "3.9" packaging==24.1 ; python_version >= "3.9" pygments==2.18.0 ; python_version >= "3.9" requests==2.32.3 ; python_version >= "3.9" diff --git a/requirements/mypy/requirements.txt b/requirements/mypy/requirements.txt index c5f3346..77945a0 100644 --- a/requirements/mypy/requirements.txt +++ b/requirements/mypy/requirements.txt @@ -1,4 +1,4 @@ mypy-extensions==1.0.0 ; python_version >= "3.9" -mypy==1.12.0 ; python_version >= "3.9" +mypy==1.13.0 ; python_version >= "3.9" tomli==2.0.2 ; python_version < "3.11" and python_version >= "3.9" typing-extensions==4.12.2 ; python_version >= "3.9" diff --git a/requirements/test/requirements.txt b/requirements/test/requirements.txt index 3f57750..f3582b3 100644 --- a/requirements/test/requirements.txt +++ b/requirements/test/requirements.txt @@ -1,11 +1,11 @@ colorama==0.4.6 ; python_version >= "3.9" and sys_platform == "win32" -coverage[toml]==7.6.3 ; python_version >= "3.9" +coverage[toml]==7.6.4 ; python_version >= "3.9" exceptiongroup==1.2.2 ; python_version < "3.11" and python_version >= "3.9" importlib-metadata==8.5.0 ; python_version < "3.10" and python_version >= "3.9" iniconfig==2.0.0 ; python_version >= "3.9" packaging==24.1 ; python_version >= "3.9" pluggy==1.5.0 ; python_version >= "3.9" -pytest-randomly==3.15.0 ; python_version >= "3.9" +pytest-randomly==3.16.0 ; python_version >= "3.9" pytest==8.3.3 ; python_version >= "3.9" tomli==2.0.2 ; python_full_version <= "3.11.0a6" and python_version >= "3.9" zipp==3.20.2 ; python_version < "3.10" and python_version >= "3.9" diff --git a/src/sqliteimport/importer.py b/src/sqliteimport/importer.py index b94404c..baac359 100644 --- a/src/sqliteimport/importer.py +++ b/src/sqliteimport/importer.py @@ -78,7 +78,7 @@ def load(database: pathlib.Path | str | sqlite3.Connection) -> None: class SqliteDistribution(importlib.metadata.Distribution): - def __init__(self, name: str, connection: sqlite3.Connection): + def __init__(self, name: str, connection: sqlite3.Connection) -> None: self.__name = name self.__connection = connection self.__accessor = Accessor(connection)