pyprojkit 0.2.0__tar.gz → 0.3.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyprojkit
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Development workflow toolkit for Python projects: pyproject.toml sync, doit tasks, nox sessions
5
5
  Author: mm21
6
6
  Author-email: mm21 <mm21.dev@gmail.com>
@@ -27,7 +27,7 @@ Requires-Dist: pyright>=1.1.329,<2 ; extra == 'analysis'
27
27
  Requires-Dist: mkinit ; extra == 'doc'
28
28
  Requires-Dist: autoflake>=2.3.1,<3 ; extra == 'format'
29
29
  Requires-Dist: black>=25.1.0,<26 ; extra == 'format'
30
- Requires-Dist: docformatter>=1.7.7,<2 ; extra == 'format'
30
+ Requires-Dist: docfmt>=0.2.0,<0.3.0 ; extra == 'format'
31
31
  Requires-Dist: isort>=6.0.1,<7 ; extra == 'format'
32
32
  Requires-Dist: genbadge[tests,coverage]>=1.1.0,<2 ; extra == 'test'
33
33
  Requires-Dist: pytest>=8.4.2,<9 ; extra == 'test'
@@ -160,7 +160,7 @@ python = PythonVersions(3, (12, 14), patch_overrides={(3, 14): "3.14.7"})
160
160
 
161
161
  Tool configurations are grouped by category under `ToolsConfig`, whose defaults constitute the default *profile*:
162
162
 
163
- - `formatting`: ordered chain of formatters; by default autoflake &rarr; isort &rarr; black &rarr; docformatter &rarr; toml-sort
163
+ - `formatting`: ordered chain of formatters; by default autoflake &rarr; isort &rarr; docfmt &rarr; black &rarr; toml-sort
164
164
  - `test`: pytest + coverage settings
165
165
  - `doit`, `nox`: cache locations and backends
166
166
  - `doc`: documentation tools — mkinit (enabled by default) and sphinx (opt-in)
@@ -117,7 +117,7 @@ python = PythonVersions(3, (12, 14), patch_overrides={(3, 14): "3.14.7"})
117
117
 
118
118
  Tool configurations are grouped by category under `ToolsConfig`, whose defaults constitute the default *profile*:
119
119
 
120
- - `formatting`: ordered chain of formatters; by default autoflake &rarr; isort &rarr; black &rarr; docformatter &rarr; toml-sort
120
+ - `formatting`: ordered chain of formatters; by default autoflake &rarr; isort &rarr; docfmt &rarr; black &rarr; toml-sort
121
121
  - `test`: pytest + coverage settings
122
122
  - `doit`, `nox`: cache locations and backends
123
123
  - `doc`: documentation tools — mkinit (enabled by default) and sphinx (opt-in)
@@ -27,7 +27,7 @@ license-files = ["LICENSE"]
27
27
  name = "pyprojkit"
28
28
  readme = "README.md"
29
29
  requires-python = ">=3.12,<3.15" # managed by pyprojkit
30
- version = "0.2.0"
30
+ version = "0.3.0"
31
31
 
32
32
  [project.optional-dependencies]
33
33
  all = [
@@ -43,7 +43,7 @@ doc = [
43
43
  format = [
44
44
  "autoflake>=2.3.1,<3",
45
45
  "black>=25.1.0,<26",
46
- "docformatter>=1.7.7,<2",
46
+ "docfmt>=0.2.0,<0.3.0",
47
47
  "isort>=6.0.1,<7"
48
48
  ]
49
49
  test = [
@@ -90,13 +90,11 @@ exclude_lines = [
90
90
  [tool.coverage.run] # managed by pyprojkit
91
91
  data_file = "__cache__/.coverage"
92
92
 
93
- [tool.docformatter] # managed by pyprojkit
94
- black = true
93
+ [tool.docfmt] # managed by pyprojkit
94
+ force-reflow = true
95
95
  in-place = true
96
- make-summary-multi-line = true
97
- non-strict = true
98
- pre-summary-newline = true
99
96
  recursive = true
97
+ summary-on-own-line = true
100
98
 
101
99
  [tool.doit] # managed by pyprojkit
102
100
  dep_file = "__cache__/.doit.db"
@@ -116,7 +114,7 @@ managed = [
116
114
  "tool.black",
117
115
  "tool.coverage.report",
118
116
  "tool.coverage.run",
119
- "tool.docformatter",
117
+ "tool.docfmt",
120
118
  "tool.doit",
121
119
  "tool.isort",
122
120
  "tool.nox",
@@ -139,5 +137,4 @@ sort_table_keys = true
139
137
  spaces_before_inline_comment = 2
140
138
 
141
139
  [tool.uv.sources]
142
- docformatter = {git = "https://github.com/mm21/docformatter.git"}
143
140
  mkinit = {git = "https://github.com/mm21/mkinit.git"}
@@ -27,7 +27,7 @@ from .config import (
27
27
  AutoflakeConfig,
28
28
  IsortConfig,
29
29
  BlackConfig,
30
- DocformatterConfig,
30
+ DocfmtConfig,
31
31
  TomlSortConfig,
32
32
  PytestConfig,
33
33
  CoverageRunConfig,
@@ -74,7 +74,7 @@ __all__ = [
74
74
  "AutoflakeConfig",
75
75
  "IsortConfig",
76
76
  "BlackConfig",
77
- "DocformatterConfig",
77
+ "DocfmtConfig",
78
78
  "TomlSortConfig",
79
79
  "PytestConfig",
80
80
  "CoverageRunConfig",
@@ -20,7 +20,7 @@ from .tools import (
20
20
  AutoflakeConfig,
21
21
  IsortConfig,
22
22
  BlackConfig,
23
- DocformatterConfig,
23
+ DocfmtConfig,
24
24
  TomlSortConfig,
25
25
  PytestConfig,
26
26
  CoverageRunConfig,
@@ -54,7 +54,7 @@ __all__ = [
54
54
  "AutoflakeConfig",
55
55
  "IsortConfig",
56
56
  "BlackConfig",
57
- "DocformatterConfig",
57
+ "DocfmtConfig",
58
58
  "TomlSortConfig",
59
59
  "PytestConfig",
60
60
  "CoverageRunConfig",
@@ -21,7 +21,7 @@ from .project import FormattingConfig, ToolsConfig
21
21
  from .tools import (
22
22
  AutoflakeConfig,
23
23
  BlackConfig,
24
- DocformatterConfig,
24
+ DocfmtConfig,
25
25
  IsortConfig,
26
26
  TomlSortConfig,
27
27
  )
@@ -39,7 +39,7 @@ def _default_formatting() -> FormattingConfig:
39
39
  formatters=(
40
40
  AutoflakeConfig(),
41
41
  IsortConfig(),
42
- DocformatterConfig(),
42
+ DocfmtConfig(),
43
43
  BlackConfig(),
44
44
  TomlSortConfig(),
45
45
  )
@@ -189,19 +189,23 @@ class ProjectConfig:
189
189
  """
190
190
  Import name of the package, e.g. `"trilium_alchemy"`.
191
191
  """
192
+
192
193
  python: PythonVersions
193
194
  """
194
195
  Supported Python versions.
195
196
  """
197
+
196
198
  packages_dir: str = "src"
197
199
  """
198
200
  Directory containing packages, relative to the project root.
199
201
  """
202
+
200
203
  format_paths: Sequence[str] = ("src", "test", "doc", "examples")
201
204
  """
202
205
  Directories to format (those which exist), in addition to `*.py` and `*.toml` files
203
206
  at the project root.
204
207
  """
208
+
205
209
  tools: ToolsConfig = field(default_factory=ToolsConfig.default)
206
210
  """
207
211
  Tool configurations.
@@ -19,7 +19,7 @@ __all__ = [
19
19
  "AutoflakeConfig",
20
20
  "IsortConfig",
21
21
  "BlackConfig",
22
- "DocformatterConfig",
22
+ "DocfmtConfig",
23
23
  "TomlSortConfig",
24
24
  "PytestConfig",
25
25
  "CoverageRunConfig",
@@ -75,25 +75,23 @@ class BlackConfig(BaseFormatterConfig):
75
75
 
76
76
 
77
77
  @dataclass(kw_only=True)
78
- class DocformatterConfig(BaseFormatterConfig):
79
- table_path: ClassVar[str] = "tool.docformatter"
78
+ class DocfmtConfig(BaseFormatterConfig):
79
+ table_path: ClassVar[str] = "tool.docfmt"
80
80
 
81
- # docformatter returns 3 when files were changed
82
- expect_rc: ClassVar[frozenset[int]] = frozenset({0, 3})
81
+ # docfmt returns 0 when it writes changes in-place; 1 means "would change"
82
+ # in check mode and 2 is an error, so only 0 is expected here
83
+ expect_rc: ClassVar[frozenset[int]] = frozenset({0})
83
84
 
84
- black: bool | None = True
85
+ # line length is left unset: docfmt picks it up from `[tool.black]`
85
86
  in_place: bool | None = field(default=True, metadata={"toml": "in-place"})
86
- make_summary_multi_line: bool | None = field(
87
- default=True, metadata={"toml": "make-summary-multi-line"}
88
- )
89
- non_strict: bool | None = field(default=True, metadata={"toml": "non-strict"})
90
- pre_summary_newline: bool | None = field(
91
- default=True, metadata={"toml": "pre-summary-newline"}
92
- )
93
87
  recursive: bool | None = True
88
+ summary_on_own_line: bool | None = field(
89
+ default=True, metadata={"toml": "summary-on-own-line"}
90
+ )
91
+ force_reflow: bool | None = field(default=True, metadata={"toml": "force-reflow"})
94
92
 
95
93
  def command(self, py_paths: list[str], toml_paths: list[str]) -> list[str]:
96
- return ["docformatter"] + py_paths
94
+ return ["docfmt"] + py_paths
97
95
 
98
96
 
99
97
  @dataclass(kw_only=True)
File without changes