dycw-pre-commit-hooks 0.10.21__tar.gz → 0.10.24__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dycw-pre-commit-hooks might be problematic. Click here for more details.

Files changed (15) hide show
  1. {dycw_pre_commit_hooks-0.10.21 → dycw_pre_commit_hooks-0.10.24}/PKG-INFO +3 -4
  2. {dycw_pre_commit_hooks-0.10.21 → dycw_pre_commit_hooks-0.10.24}/pyproject.toml +7 -9
  3. {dycw_pre_commit_hooks-0.10.21 → dycw_pre_commit_hooks-0.10.24}/src/pre_commit_hooks/__init__.py +1 -1
  4. {dycw_pre_commit_hooks-0.10.21 → dycw_pre_commit_hooks-0.10.24}/src/pre_commit_hooks/run_ruff_format/__init__.py +9 -7
  5. {dycw_pre_commit_hooks-0.10.21 → dycw_pre_commit_hooks-0.10.24}/.gitignore +0 -0
  6. {dycw_pre_commit_hooks-0.10.21 → dycw_pre_commit_hooks-0.10.24}/README.md +0 -0
  7. {dycw_pre_commit_hooks-0.10.21 → dycw_pre_commit_hooks-0.10.24}/src/pre_commit_hooks/common.py +0 -0
  8. {dycw_pre_commit_hooks-0.10.21 → dycw_pre_commit_hooks-0.10.24}/src/pre_commit_hooks/py.typed +0 -0
  9. {dycw_pre_commit_hooks-0.10.21 → dycw_pre_commit_hooks-0.10.24}/src/pre_commit_hooks/run_bump2version/__init__.py +0 -0
  10. {dycw_pre_commit_hooks-0.10.21 → dycw_pre_commit_hooks-0.10.24}/src/pre_commit_hooks/run_bump2version/__main__.py +0 -0
  11. {dycw_pre_commit_hooks-0.10.21 → dycw_pre_commit_hooks-0.10.24}/src/pre_commit_hooks/run_bump_my_version/__init__.py +0 -0
  12. {dycw_pre_commit_hooks-0.10.21 → dycw_pre_commit_hooks-0.10.24}/src/pre_commit_hooks/run_bump_my_version/__main__.py +0 -0
  13. {dycw_pre_commit_hooks-0.10.21 → dycw_pre_commit_hooks-0.10.24}/src/pre_commit_hooks/run_ruff_format/__main__.py +0 -0
  14. {dycw_pre_commit_hooks-0.10.21 → dycw_pre_commit_hooks-0.10.24}/src/tests/__init__.py +0 -0
  15. {dycw_pre_commit_hooks-0.10.21 → dycw_pre_commit_hooks-0.10.24}/src/tests/test_main.py +0 -0
@@ -1,11 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dycw-pre-commit-hooks
3
- Version: 0.10.21
3
+ Version: 0.10.24
4
4
  Author-email: Derek Wan <d.wan@icloud.com>
5
- Requires-Python: >=3.11
5
+ Requires-Python: >=3.12
6
6
  Requires-Dist: click<8.2,>=8.1.8
7
- Requires-Dist: dycw-utilities<0.96,>=0.95.21
8
- Requires-Dist: jupyterlab>=4.3.5
7
+ Requires-Dist: dycw-utilities<0.105,>=0.104.7
9
8
  Requires-Dist: loguru<0.8,>=0.7.3
10
9
  Requires-Dist: semver<3.1,>=3.0.4
11
10
  Requires-Dist: tomlkit<0.14,>=0.13.2
@@ -9,7 +9,6 @@ requires = ["hatchling"]
9
9
  [dependency-groups]
10
10
  dev = [
11
11
  "dycw-utilities[test]",
12
- "setuptools", # https://github.com/theY4Kman/pytest-only/issues/14
13
12
  ]
14
13
 
15
14
  # project
@@ -17,8 +16,7 @@ dev = [
17
16
  authors = [{name = "Derek Wan", email = "d.wan@icloud.com"}]
18
17
  dependencies = [
19
18
  "click >= 8.1.8, < 8.2",
20
- "dycw-utilities >= 0.95.21, < 0.96",
21
- "jupyterlab>=4.3.5",
19
+ "dycw-utilities >= 0.104.7, < 0.105",
22
20
  "loguru >= 0.7.3, < 0.8",
23
21
  "semver >= 3.0.4, < 3.1",
24
22
  "tomlkit >= 0.13.2, < 0.14",
@@ -26,8 +24,8 @@ dependencies = [
26
24
  ]
27
25
  name = "dycw-pre-commit-hooks"
28
26
  readme = "README.md"
29
- requires-python = ">= 3.11"
30
- version = "0.10.21"
27
+ requires-python = ">= 3.12"
28
+ version = "0.10.24"
31
29
 
32
30
  [project.scripts]
33
31
  run-bump-my-version = "pre_commit_hooks.run_bump_my_version:main"
@@ -37,7 +35,7 @@ run-ruff-format = "pre_commit_hooks.run_ruff_format:main"
37
35
  # bump-my-version
38
36
  [tool.bumpversion]
39
37
  allow_dirty = true
40
- current_version = "0.10.21"
38
+ current_version = "0.10.24"
41
39
 
42
40
  [[tool.bumpversion.files]]
43
41
  filename = "src/pre_commit_hooks/__init__.py"
@@ -73,7 +71,7 @@ packages = ["src/pre_commit_hooks"]
73
71
  # nitpick
74
72
  [tool.nitpick]
75
73
  style = [
76
- "https://raw.githubusercontent.com/dycw/nitpick/master/styles/3.11.toml",
74
+ "https://raw.githubusercontent.com/dycw/nitpick/master/styles/3.12.toml",
77
75
  "https://raw.githubusercontent.com/dycw/nitpick/master/styles/common.toml",
78
76
  ]
79
77
 
@@ -81,7 +79,7 @@ style = [
81
79
  [tool.pyright]
82
80
  deprecateTypingAliases = true
83
81
  enableReachabilityAnalysis = false
84
- pythonVersion = "3.11"
82
+ pythonVersion = "3.12"
85
83
  reportAny = false
86
84
  reportCallInDefaultInitializer = true
87
85
  reportImplicitOverride = true
@@ -117,7 +115,7 @@ xfail_strict = true
117
115
  # ruff
118
116
  [tool.ruff]
119
117
  src = ["src"]
120
- target-version = "py311"
118
+ target-version = "py312"
121
119
  unsafe-fixes = true
122
120
 
123
121
  [tool.ruff.format]
@@ -1,3 +1,3 @@
1
1
  from __future__ import annotations
2
2
 
3
- __version__ = "0.10.21"
3
+ __version__ = "0.10.24"
@@ -1,15 +1,17 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from subprocess import CalledProcessError, check_call
4
- from typing import cast
4
+ from typing import TYPE_CHECKING, cast
5
5
 
6
6
  from click import command
7
7
  from loguru import logger
8
8
  from tomlkit import dumps, table
9
- from tomlkit.container import Container
10
9
 
11
10
  from pre_commit_hooks.common import PYPROJECT_TOML, PyProject, read_pyproject
12
11
 
12
+ if TYPE_CHECKING:
13
+ from tomlkit.container import Container
14
+
13
15
 
14
16
  @command()
15
17
  def main() -> bool:
@@ -30,25 +32,25 @@ def _get_modified_pyproject() -> PyProject:
30
32
  pyproject = read_pyproject()
31
33
  doc = pyproject.doc
32
34
  try:
33
- tool = cast(Container, doc["tool"])
35
+ tool = cast("Container", doc["tool"])
34
36
  except KeyError:
35
37
  tool = table()
36
38
  try:
37
- ruff = cast(Container, tool["ruff"])
39
+ ruff = cast("Container", tool["ruff"])
38
40
  except KeyError:
39
41
  ruff = table()
40
42
  ruff["line-length"] = 320
41
43
  try:
42
- format_ = cast(Container, ruff["format"])
44
+ format_ = cast("Container", ruff["format"])
43
45
  except KeyError:
44
46
  format_ = table()
45
47
  format_["skip-magic-trailing-comma"] = True
46
48
  try:
47
- lint = cast(Container, ruff["lint"])
49
+ lint = cast("Container", ruff["lint"])
48
50
  except KeyError:
49
51
  lint = table()
50
52
  try:
51
- isort = cast(Container, lint["isort"])
53
+ isort = cast("Container", lint["isort"])
52
54
  except KeyError:
53
55
  isort = table()
54
56
  isort["split-on-trailing-comma"] = False