hydev 5.2.0__tar.gz → 6.1.0__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.
hydev-6.1.0/PKG-INFO ADDED
@@ -0,0 +1,55 @@
1
+ Metadata-Version: 2.4
2
+ Name: hydev
3
+ Version: 6.1.0
4
+ Summary: Common tooling and configuration for pythonic development
5
+ Project-URL: Repository, https://gitlab.com/hoverhell/hydev
6
+ Author-email: hoverhell <hoverhell@gmail.com>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Requires-Python: <4,>=3.11
10
+ Requires-Dist: autoflake>=2.3.1
11
+ Requires-Dist: click>=8.1.8
12
+ Requires-Dist: coloredlogs>=15.0.1
13
+ Requires-Dist: flake8-broken-line>=1.0.0
14
+ Requires-Dist: flake8-debugger>=4.1.2
15
+ Requires-Dist: flake8-mock-x2>=0.4.1
16
+ Requires-Dist: flake8-print>=5.0.0
17
+ Requires-Dist: flake8-use-fstring>=1.4
18
+ Requires-Dist: flake8>=7.2.0
19
+ Requires-Dist: humanfriendly>=10.0
20
+ Requires-Dist: ipdb>=0.13.13
21
+ Requires-Dist: isort>=6.0.1
22
+ Requires-Dist: mypy>=1.15.0
23
+ Requires-Dist: pre-commit>=4.2.0
24
+ Requires-Dist: pytest-asyncio>=0.26.0
25
+ Requires-Dist: pytest-blockage>=0.2.4
26
+ Requires-Dist: pytest-cov>=6.1.1
27
+ Requires-Dist: pytest-deadfixtures>=2.2.1
28
+ Requires-Dist: pytest-env>=1.1.5
29
+ Requires-Dist: pytest-timeout>=2.3.1
30
+ Requires-Dist: pytest>=8.3.5
31
+ Requires-Dist: pyyaml>=6.0.2
32
+ Requires-Dist: ruff>=0.11.6
33
+ Requires-Dist: toml>=0.10.2
34
+ Requires-Dist: uv>=0.9.14
35
+ Provides-Extra: django
36
+ Requires-Dist: django-coverage-plugin>=3.1.0; extra == 'django'
37
+ Requires-Dist: django-debug-toolbar>=5.1.0; extra == 'django'
38
+ Requires-Dist: django-extra-checks>=0.16.1; extra == 'django'
39
+ Requires-Dist: django-migration-linter>=5.2.0; extra == 'django'
40
+ Requires-Dist: django-querycount>=0.8.3; extra == 'django'
41
+ Requires-Dist: django-split-settings>=1.3.2; extra == 'django'
42
+ Requires-Dist: django-stubs-ext>=5.1.3; extra == 'django'
43
+ Requires-Dist: django-stubs>=5.1.3; extra == 'django'
44
+ Requires-Dist: django-test-migrations>=1.5.0; extra == 'django'
45
+ Requires-Dist: flake8-django-hhupd>=1.4.1; extra == 'django'
46
+ Requires-Dist: pytest-django>=4.11.1; extra == 'django'
47
+ Provides-Extra: hydlog
48
+ Requires-Dist: hyapp>=4.0.1; extra == 'hydlog'
49
+ Provides-Extra: limbo
50
+ Requires-Dist: black>=25.11.0; extra == 'limbo'
51
+ Requires-Dist: flake8-pytest-style>=2.1.0; extra == 'limbo'
52
+ Description-Content-Type: text/markdown
53
+
54
+ # hydev
55
+ Common tooling and configuration for pythonic development
@@ -1,34 +1,34 @@
1
1
  [project]
2
2
  name = "hydev"
3
- version = "5.2.0"
3
+ version = "6.1.0"
4
4
  description = "Common tooling and configuration for pythonic development"
5
5
  authors = [{ name = "hoverhell", email = "hoverhell@gmail.com" }]
6
6
  requires-python = ">=3.11,<4"
7
7
  readme = "README.md"
8
8
  license = "MIT"
9
9
  dependencies = [
10
- "click>=8.1.8,<9",
11
- "pyyaml>=6.0.2,<7",
12
- "toml>=0.10.2,<0.11",
13
- "pre-commit>=4.2.0,<5",
14
- "coloredlogs>=15.0.1,<16",
15
- "ipdb>=0.13.13,<0.14",
16
- "autoflake>=2.3.1,<3",
17
- "isort>=6.0.1,<7",
18
- "flake8>=7.2.0,<8",
19
- "flake8-broken-line>=1.0.0,<2",
20
- "flake8-debugger>=4.1.2,<5",
21
- "flake8-mock-x2>=0.4.1,<0.5",
22
- "flake8-print>=5.0.0,<6",
23
- "flake8-use-fstring~=1.4",
24
- "mypy>=1.15.0,<2",
25
- "pytest>=8.3.5,<9",
26
- "pytest-asyncio>=0.26.0,<0.27",
27
- "pytest-blockage>=0.2.4,<0.3",
28
- "pytest-cov>=6.1.1,<7",
29
- "pytest-deadfixtures>=2.2.1,<3",
30
- "pytest-env>=1.1.5,<2",
31
- "pytest-timeout>=2.3.1,<3",
10
+ "click>=8.1.8",
11
+ "pyyaml>=6.0.2",
12
+ "toml>=0.10.2",
13
+ "pre-commit>=4.2.0",
14
+ "coloredlogs>=15.0.1",
15
+ "ipdb>=0.13.13",
16
+ "autoflake>=2.3.1",
17
+ "isort>=6.0.1",
18
+ "flake8>=7.2.0",
19
+ "flake8-broken-line>=1.0.0",
20
+ "flake8-debugger>=4.1.2",
21
+ "flake8-mock-x2>=0.4.1",
22
+ "flake8-print>=5.0.0",
23
+ "flake8-use-fstring>=1.4",
24
+ "mypy>=1.15.0",
25
+ "pytest>=8.3.5",
26
+ "pytest-asyncio>=0.26.0",
27
+ "pytest-blockage>=0.2.4",
28
+ "pytest-cov>=6.1.1",
29
+ "pytest-deadfixtures>=2.2.1",
30
+ "pytest-env>=1.1.5",
31
+ "pytest-timeout>=2.3.1",
32
32
  "ruff>=0.11.6",
33
33
  "uv>=0.9.14",
34
34
  "humanfriendly>=10.0",
@@ -37,17 +37,17 @@ dependencies = [
37
37
  [project.optional-dependencies]
38
38
  hydlog = ["hyapp>=4.0.1"]
39
39
  django = [
40
- "django-coverage-plugin>=3.1.0,<4",
41
- "django-debug-toolbar>=5.1.0,<6",
42
- "django-extra-checks>=0.16.1,<0.17",
43
- "django-migration-linter>=5.2.0,<6",
44
- "django-querycount>=0.8.3,<0.9",
45
- "django-split-settings>=1.3.2,<2",
46
- "django-stubs>=5.1.3,<6",
47
- "django-stubs-ext>=5.1.3,<6",
48
- "django-test-migrations>=1.5.0,<2",
49
- "flake8-django-hhupd>=1.4.1,<2",
50
- "pytest-django>=4.11.1,<5",
40
+ "django-coverage-plugin>=3.1.0",
41
+ "django-debug-toolbar>=5.1.0",
42
+ "django-extra-checks>=0.16.1",
43
+ "django-migration-linter>=5.2.0",
44
+ "django-querycount>=0.8.3",
45
+ "django-split-settings>=1.3.2",
46
+ "django-stubs>=5.1.3",
47
+ "django-stubs-ext>=5.1.3",
48
+ "django-test-migrations>=1.5.0",
49
+ "flake8-django-hhupd>=1.4.1",
50
+ "pytest-django>=4.11.1",
51
51
  ]
52
52
  limbo = [
53
53
  "black>=25.11.0",
@@ -74,10 +74,10 @@ hydlog = "hydev.hydlog:main"
74
74
 
75
75
  [dependency-groups]
76
76
  dev = [
77
- "types-toml>=0.10.8.20240310,<0.11",
78
- "types-requests>=2.32.0.20250328,<3",
79
- "types-pyyaml>=6.0.12.20250402,<7",
80
- "types-humanfriendly>=10.0.1.20250319,<11",
77
+ "types-toml>=0.10.8.20240310",
78
+ "types-requests>=2.32.0.20250328",
79
+ "types-pyyaml>=6.0.12.20250402",
80
+ "types-humanfriendly>=10.0.1.20250319",
81
81
  "pyaux>=3.3.0",
82
82
  "ipdb>=0.13.13",
83
83
  "hyapp>=4.0.1",
@@ -84,6 +84,17 @@ class LocalConfigManager:
84
84
  return ["uv", "run", *self.command_run_uv_args, "--"]
85
85
  return []
86
86
 
87
+ def is_tool_enabled(self, tool_name: str, *, default: bool = True) -> bool:
88
+ cfg_path = ("tool", "hydev", f"enable_{tool_name}")
89
+ try:
90
+ cfg = getitem_path(self.local_config, cfg_path)
91
+ except KeyError:
92
+ return default
93
+ else:
94
+ if not isinstance(cfg, bool):
95
+ raise ValueError(f"Expected boolean at {cfg_path}, got {type(cfg)}")
96
+ return cfg
97
+
87
98
 
88
99
  DEFAULT_LOCAL_CONFIG_MGR = LocalConfigManager()
89
100
 
@@ -141,6 +152,7 @@ def extend_ignore_paths(config, paths: list[str]):
141
152
 
142
153
 
143
154
  class CLIToolBase:
155
+ TOOL_NAME: ClassVar[str]
144
156
  local_config_mgr: ClassVar[LocalConfigManager] = DEFAULT_LOCAL_CONFIG_MGR
145
157
 
146
158
  def run(self) -> None:
@@ -154,6 +166,8 @@ class CLIToolBase:
154
166
  class CommonEnvWrapTool(CLIToolBase):
155
167
  """Ensures the tool is running in the current uv/poetry environment"""
156
168
 
169
+ TOOL_NAME: ClassVar[str]
170
+
157
171
  auto_wrap_rerun: ClassVar[bool] = True
158
172
 
159
173
  @staticmethod
@@ -198,7 +212,8 @@ class CommonEnvWrapTool(CLIToolBase):
198
212
 
199
213
 
200
214
  class CommonCLITool(CommonEnvWrapTool):
201
- tool_name: str
215
+ TOOL_NAME: ClassVar[str]
216
+
202
217
  should_add_default_path: bool = False
203
218
  ignored_args: frozenset[str] = frozenset(["--check"])
204
219
  concatenate_disable_suffix: ClassVar[str] = "__replace"
@@ -292,7 +307,7 @@ class CommonCLITool(CommonEnvWrapTool):
292
307
  *run_prefix,
293
308
  "python",
294
309
  "-m",
295
- self.tool_name,
310
+ self.TOOL_NAME,
296
311
  *self.tool_extra_args(),
297
312
  *extra_args,
298
313
  ]
@@ -336,7 +351,7 @@ class ConfiguredCLITool(CommonCLITool):
336
351
  class RuffBase(ConfiguredCLITool):
337
352
  ruff_command: str
338
353
 
339
- tool_name: str = "ruff"
354
+ TOOL_NAME: ClassVar[str] = "ruff"
340
355
  config_flag: str = "--config"
341
356
 
342
357
  def tool_extra_args(self) -> Sequence[str]:
@@ -366,7 +381,7 @@ class Autoflake(CommonCLITool):
366
381
  build the extra args.
367
382
  """
368
383
 
369
- tool_name: str = "autoflake"
384
+ TOOL_NAME: ClassVar[str] = "autoflake"
370
385
  should_add_default_path: bool = True
371
386
  ignored_args: frozenset[str] = ConfiguredCLITool.ignored_args - {"--check"}
372
387
 
@@ -381,21 +396,21 @@ class Autoflake(CommonCLITool):
381
396
 
382
397
 
383
398
  class ISort(ConfiguredCLITool):
384
- tool_name: str = "isort"
399
+ TOOL_NAME: ClassVar[str] = "isort"
385
400
  config_flag: str = "--settings"
386
401
  should_add_default_path: bool = True
387
402
  ignored_args: frozenset[str] = ConfiguredCLITool.ignored_args - {"--check"}
388
403
 
389
404
 
390
405
  class Black(ConfiguredCLITool):
391
- tool_name: str = "black"
406
+ TOOL_NAME: ClassVar[str] = "black"
392
407
  config_flag: str = "--config"
393
408
  should_add_default_path: bool = True
394
409
  ignored_args: frozenset[str] = ConfiguredCLITool.ignored_args - {"--check"}
395
410
 
396
411
 
397
412
  class Flake8(ConfiguredCLITool):
398
- tool_name: str = "flake8"
413
+ TOOL_NAME: ClassVar[str] = "flake8"
399
414
  config_flag: str = "--config"
400
415
  config_ext: str = "cfg" # as in `setup.cfg`
401
416
 
@@ -404,12 +419,12 @@ class Flake8(ConfiguredCLITool):
404
419
 
405
420
 
406
421
  class Mypy(ConfiguredCLITool):
407
- tool_name: str = "mypy"
422
+ TOOL_NAME: ClassVar[str] = "mypy"
408
423
  config_flag: str = "--config-file"
409
424
 
410
425
 
411
426
  class Pytest(ConfiguredCLITool):
412
- tool_name: str = "pytest"
427
+ TOOL_NAME: ClassVar[str] = "pytest"
413
428
  config_flag: str = "-c"
414
429
 
415
430
  def tool_extra_args(self) -> Sequence[str]:
@@ -419,9 +434,13 @@ class Pytest(ConfiguredCLITool):
419
434
  class CLIToolWrapper(CommonEnvWrapTool):
420
435
  wrapped: tuple[type[CLIToolBase], ...]
421
436
 
437
+ def is_enabled(self, tool_name: str) -> bool:
438
+ return self.local_config_mgr.is_tool_enabled(tool_name)
439
+
422
440
  def run(self) -> None:
423
441
  for tool in self.wrapped:
424
- tool.run_cli()
442
+ if self.is_enabled(tool.TOOL_NAME):
443
+ tool.run_cli()
425
444
 
426
445
 
427
446
  class Format(CLIToolWrapper):
hydev-5.2.0/PKG-INFO DELETED
@@ -1,55 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: hydev
3
- Version: 5.2.0
4
- Summary: Common tooling and configuration for pythonic development
5
- Project-URL: Repository, https://gitlab.com/hoverhell/hydev
6
- Author-email: hoverhell <hoverhell@gmail.com>
7
- License-Expression: MIT
8
- License-File: LICENSE
9
- Requires-Python: <4,>=3.11
10
- Requires-Dist: autoflake<3,>=2.3.1
11
- Requires-Dist: click<9,>=8.1.8
12
- Requires-Dist: coloredlogs<16,>=15.0.1
13
- Requires-Dist: flake8-broken-line<2,>=1.0.0
14
- Requires-Dist: flake8-debugger<5,>=4.1.2
15
- Requires-Dist: flake8-mock-x2<0.5,>=0.4.1
16
- Requires-Dist: flake8-print<6,>=5.0.0
17
- Requires-Dist: flake8-use-fstring~=1.4
18
- Requires-Dist: flake8<8,>=7.2.0
19
- Requires-Dist: humanfriendly>=10.0
20
- Requires-Dist: ipdb<0.14,>=0.13.13
21
- Requires-Dist: isort<7,>=6.0.1
22
- Requires-Dist: mypy<2,>=1.15.0
23
- Requires-Dist: pre-commit<5,>=4.2.0
24
- Requires-Dist: pytest-asyncio<0.27,>=0.26.0
25
- Requires-Dist: pytest-blockage<0.3,>=0.2.4
26
- Requires-Dist: pytest-cov<7,>=6.1.1
27
- Requires-Dist: pytest-deadfixtures<3,>=2.2.1
28
- Requires-Dist: pytest-env<2,>=1.1.5
29
- Requires-Dist: pytest-timeout<3,>=2.3.1
30
- Requires-Dist: pytest<9,>=8.3.5
31
- Requires-Dist: pyyaml<7,>=6.0.2
32
- Requires-Dist: ruff>=0.11.6
33
- Requires-Dist: toml<0.11,>=0.10.2
34
- Requires-Dist: uv>=0.9.14
35
- Provides-Extra: django
36
- Requires-Dist: django-coverage-plugin<4,>=3.1.0; extra == 'django'
37
- Requires-Dist: django-debug-toolbar<6,>=5.1.0; extra == 'django'
38
- Requires-Dist: django-extra-checks<0.17,>=0.16.1; extra == 'django'
39
- Requires-Dist: django-migration-linter<6,>=5.2.0; extra == 'django'
40
- Requires-Dist: django-querycount<0.9,>=0.8.3; extra == 'django'
41
- Requires-Dist: django-split-settings<2,>=1.3.2; extra == 'django'
42
- Requires-Dist: django-stubs-ext<6,>=5.1.3; extra == 'django'
43
- Requires-Dist: django-stubs<6,>=5.1.3; extra == 'django'
44
- Requires-Dist: django-test-migrations<2,>=1.5.0; extra == 'django'
45
- Requires-Dist: flake8-django-hhupd<2,>=1.4.1; extra == 'django'
46
- Requires-Dist: pytest-django<5,>=4.11.1; extra == 'django'
47
- Provides-Extra: hydlog
48
- Requires-Dist: hyapp>=4.0.1; extra == 'hydlog'
49
- Provides-Extra: limbo
50
- Requires-Dist: black>=25.11.0; extra == 'limbo'
51
- Requires-Dist: flake8-pytest-style>=2.1.0; extra == 'limbo'
52
- Description-Content-Type: text/markdown
53
-
54
- # hydev
55
- Common tooling and configuration for pythonic development
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes