Skip to content
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
8 changes: 8 additions & 0 deletions .cz.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "v$version"
version_scheme = "semver2"
version_provider = "scm"
update_changelog_on_bump = true
major_version_zero = true
annotated_tag = true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,4 @@ tags
.ruff_cache/
coverage.*
.coverage.*
.cache/nitpick/
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,18 @@ repos:
rev: '0544741e2b4a22b472d9d93e37d4ea9153820bb1' # frozen: v2.3.1
hooks:
- id: autoflake
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: '19b28a9f0a0102b30776f054bea4176e7af50dbe' # frozen: v2.15.0
hooks:
- id: pretty-format-toml
args:
- --autofix
- --no-sort
- --trailing-commas
- --indent
- '4'
- --inline-comment-spaces
- '1'
minimum_pre_commit_version: 4.3.0
default_install_hook_types:
- pre-commit
Expand Down
43 changes: 16 additions & 27 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description = "A simple asyncio.Protocol implementation designed for IRC"
readme = "README.md"
license = "MIT"
requires-python = ">=3.10"
authors = [{ name = "linuxdaemon", email = "[email protected]" }]
authors = [{name = "linuxdaemon", email = "[email protected]"}]
keywords = ["async-irc", "asyncio", "asyncirc", "irc", "irc-framework"]
classifiers = [
"Development Status :: 3 - Alpha",
Expand Down Expand Up @@ -46,45 +46,42 @@ dependencies = [
"pre-commit==4.3.0",
"mypy==1.18.2",
]
post-install-commands = [
"hatch run pre-commit:install"
]
post-install-commands = ["hatch run pre-commit:install"]

[tool.hatch.envs.hatch-test]
post-install-commands = []
default-args = ["tests", "asyncirc"]
extra-args = ["-vv", "--junitxml=junit.xml"]
extra-dependencies = ["pytest-asyncio==1.2.0"]

[tool.hatch.envs.hatch-test.scripts]
run = "pytest{env:HATCH_TEST_ARGS:} {args}"
run-cov = "coverage run -m pytest{env:HATCH_TEST_ARGS:} {args}"
cov-combine = "coverage combine"
cov-report = ["coverage report --show-missing --skip-covered", "coverage xml"]

[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.14", "3.13", "3.12", "3.11", "3.10"]

[tool.hatch.envs.hatch-static-analysis]
post-install-commands = []

[tool.hatch.envs.hatch-build]
post-install-commands = []

[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.14", "3.13", "3.12", "3.11", "3.10"]

[tool.hatch.envs.pre-commit]
extra-dependencies = [
"pre-commit==4.3.0",
]
extra-dependencies = ["pre-commit==4.3.0"]
post-install-commands = []

[tool.hatch.envs.pre-commit.scripts]
run = "pre-commit run {args:--all}"
install = "pre-commit install -f"

[tool.hatch.envs.types]
template = "hatch-test"
extra-dependencies = [
"mypy==1.18.2",
]
extra-dependencies = ["mypy==1.18.2"]
post-install-commands = []

[tool.hatch.envs.types.scripts]
check = "mypy {args:asyncirc tests}"

Expand Down Expand Up @@ -138,11 +135,11 @@ select = ["ALL"]
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = [
"PLR2004", # Allow "magic values" in tests -aspen
"S101", # Allow asserts in tests
"SIM201", # We need to test weird comparison operators
"SIM202", # We need to test weird comparison operstors
"SIM300", # We need to test both forward and reverse comparisons
"FBT001", # Boolean parameters are fine for test cases
"S101", # Allow asserts in tests
"SIM201", # We need to test weird comparison operators
"SIM202", # We need to test weird comparison operstors
"SIM300", # We need to test both forward and reverse comparisons
"FBT001", # Boolean parameters are fine for test cases
]

[tool.ruff.lint.pycodestyle]
Expand Down Expand Up @@ -188,6 +185,7 @@ enable_error_code = [
"truthy-bool",
"truthy-iterable",
"ignore-without-code",
"deprecated",
]
ignore_missing_imports = true

Expand All @@ -211,15 +209,6 @@ exclude_lines = [
branch = true
relative_files = true

[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "v$version"
version_scheme = "semver2"
version_provider = "scm"
update_changelog_on_bump = true
major_version_zero = true
annotated_tag = true

[tool.nitpick]
style = ["gh://TotallyNotRobots/nitpick/lib-style-3.10.toml"]

Expand Down