Skip to content
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

Add more pre-commit hooks, and run tox run -m update #21

Merged
merged 3 commits into from
Oct 31, 2024
Merged
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
12 changes: 11 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
20 changes: 10 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ strict = true
sqlite_cache = true


# pytest
# ------

[tool.pytest.ini_options]
addopts = "--color=yes"
filterwarnings = [
"error",
]


# scriv
# -----

Expand All @@ -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",
]
2 changes: 1 addition & 1 deletion requirements/docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion requirements/mypy/requirements.txt
Original file line number Diff line number Diff line change
@@ -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"
4 changes: 2 additions & 2 deletions requirements/test/requirements.txt
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion src/sqliteimport/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down