Skip to content

Commit d5eff7d

Browse files
authored
Merge pull request #191 from TotallyNotRobots/nitpick
ci(nitpick): Sync CI configs
2 parents a82aa57 + 14817b3 commit d5eff7d

File tree

4 files changed

+37
-27
lines changed

4 files changed

+37
-27
lines changed

.cz.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[tool.commitizen]
2+
name = "cz_conventional_commits"
3+
tag_format = "v$version"
4+
version_scheme = "semver2"
5+
version_provider = "scm"
6+
update_changelog_on_bump = true
7+
major_version_zero = true
8+
annotated_tag = true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,4 @@ tags
183183
.ruff_cache/
184184
coverage.*
185185
.coverage.*
186+
.cache/nitpick/

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,18 @@ repos:
9797
rev: '0544741e2b4a22b472d9d93e37d4ea9153820bb1' # frozen: v2.3.1
9898
hooks:
9999
- id: autoflake
100+
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
101+
rev: '19b28a9f0a0102b30776f054bea4176e7af50dbe' # frozen: v2.15.0
102+
hooks:
103+
- id: pretty-format-toml
104+
args:
105+
- --autofix
106+
- --no-sort
107+
- --trailing-commas
108+
- --indent
109+
- '4'
110+
- --inline-comment-spaces
111+
- '1'
100112
minimum_pre_commit_version: 4.3.0
101113
default_install_hook_types:
102114
- pre-commit

pyproject.toml

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description = "A simple asyncio.Protocol implementation designed for IRC"
99
readme = "README.md"
1010
license = "MIT"
1111
requires-python = ">=3.10"
12-
authors = [{ name = "linuxdaemon", email = "[email protected]" }]
12+
authors = [{name = "linuxdaemon", email = "[email protected]"}]
1313
keywords = ["async-irc", "asyncio", "asyncirc", "irc", "irc-framework"]
1414
classifiers = [
1515
"Development Status :: 3 - Alpha",
@@ -46,45 +46,42 @@ dependencies = [
4646
"pre-commit==4.3.0",
4747
"mypy==1.18.2",
4848
]
49-
post-install-commands = [
50-
"hatch run pre-commit:install"
51-
]
49+
post-install-commands = ["hatch run pre-commit:install"]
5250

5351
[tool.hatch.envs.hatch-test]
5452
post-install-commands = []
5553
default-args = ["tests", "asyncirc"]
5654
extra-args = ["-vv", "--junitxml=junit.xml"]
5755
extra-dependencies = ["pytest-asyncio==1.2.0"]
56+
5857
[tool.hatch.envs.hatch-test.scripts]
5958
run = "pytest{env:HATCH_TEST_ARGS:} {args}"
6059
run-cov = "coverage run -m pytest{env:HATCH_TEST_ARGS:} {args}"
6160
cov-combine = "coverage combine"
6261
cov-report = ["coverage report --show-missing --skip-covered", "coverage xml"]
6362

63+
[[tool.hatch.envs.hatch-test.matrix]]
64+
python = ["3.14", "3.13", "3.12", "3.11", "3.10"]
65+
6466
[tool.hatch.envs.hatch-static-analysis]
6567
post-install-commands = []
6668

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

70-
[[tool.hatch.envs.hatch-test.matrix]]
71-
python = ["3.14", "3.13", "3.12", "3.11", "3.10"]
72-
7372
[tool.hatch.envs.pre-commit]
74-
extra-dependencies = [
75-
"pre-commit==4.3.0",
76-
]
73+
extra-dependencies = ["pre-commit==4.3.0"]
7774
post-install-commands = []
75+
7876
[tool.hatch.envs.pre-commit.scripts]
7977
run = "pre-commit run {args:--all}"
8078
install = "pre-commit install -f"
8179

8280
[tool.hatch.envs.types]
8381
template = "hatch-test"
84-
extra-dependencies = [
85-
"mypy==1.18.2",
86-
]
82+
extra-dependencies = ["mypy==1.18.2"]
8783
post-install-commands = []
84+
8885
[tool.hatch.envs.types.scripts]
8986
check = "mypy {args:asyncirc tests}"
9087

@@ -138,11 +135,11 @@ select = ["ALL"]
138135
[tool.ruff.lint.per-file-ignores]
139136
"tests/*.py" = [
140137
"PLR2004", # Allow "magic values" in tests -aspen
141-
"S101", # Allow asserts in tests
142-
"SIM201", # We need to test weird comparison operators
143-
"SIM202", # We need to test weird comparison operstors
144-
"SIM300", # We need to test both forward and reverse comparisons
145-
"FBT001", # Boolean parameters are fine for test cases
138+
"S101", # Allow asserts in tests
139+
"SIM201", # We need to test weird comparison operators
140+
"SIM202", # We need to test weird comparison operstors
141+
"SIM300", # We need to test both forward and reverse comparisons
142+
"FBT001", # Boolean parameters are fine for test cases
146143
]
147144

148145
[tool.ruff.lint.pycodestyle]
@@ -188,6 +185,7 @@ enable_error_code = [
188185
"truthy-bool",
189186
"truthy-iterable",
190187
"ignore-without-code",
188+
"deprecated",
191189
]
192190
ignore_missing_imports = true
193191

@@ -211,15 +209,6 @@ exclude_lines = [
211209
branch = true
212210
relative_files = true
213211

214-
[tool.commitizen]
215-
name = "cz_conventional_commits"
216-
tag_format = "v$version"
217-
version_scheme = "semver2"
218-
version_provider = "scm"
219-
update_changelog_on_bump = true
220-
major_version_zero = true
221-
annotated_tag = true
222-
223212
[tool.nitpick]
224213
style = ["gh://TotallyNotRobots/nitpick/lib-style-3.10.toml"]
225214

0 commit comments

Comments
 (0)