duty 1.4.1__py3-none-any.whl → 1.4.2__py3-none-any.whl

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.
@@ -24,6 +24,7 @@ def run(
24
24
  magic_trailing_comma: bool = True,
25
25
  python_cell_magics: set[str] | None = None,
26
26
  preview: bool = False,
27
+ check_only: bool = False,
27
28
  ) -> int:
28
29
  """Run `blacken-docs`.
29
30
 
@@ -44,6 +45,8 @@ def run(
44
45
  Useful for formatting cells with custom python magics.
45
46
  preview: Enable potentially disruptive style changes that may be added
46
47
  to Black's main functionality in the next major release.
48
+ check_only: Don't modify files but indicate when changes are necessary
49
+ with a message and non-zero return code.
47
50
 
48
51
  Returns:
49
52
  Success/failure.
@@ -80,5 +83,6 @@ def run(
80
83
  black_mode,
81
84
  skip_errors=skip_errors,
82
85
  rst_literal_blocks=rst_literal_blocks,
86
+ check_only=check_only,
83
87
  )
84
88
  return retv
duty/callables/ruff.py CHANGED
@@ -1,4 +1,4 @@
1
- """Callable for [Ruff](https://github.com/charliermarsh/ruff)."""
1
+ """Callable for [Ruff](https://github.com/astral-sh/ruff)."""
2
2
 
3
3
  from __future__ import annotations
4
4
 
@@ -90,34 +90,34 @@ def check(
90
90
  """Run Ruff on the given files or directories.
91
91
 
92
92
  Parameters:
93
- fix: Attempt to automatically fix lint violations
94
- config: Path to the `pyproject.toml` or `ruff.toml` file to use for configuration
95
- show_source: Show violations with source code
96
- show_fixes: Show an enumeration of all autofixed lint violations
97
- diff: Avoid writing any fixed files back; instead, output a diff for each changed file to stdout
98
- watch: Run in watch mode by re-running whenever files change
99
- fix_only: Fix any fixable lint violations, but don't report on leftover violations. Implies `--fix`
100
- output_format: Output serialization format for violations [env: RUFF_FORMAT=] [possible values: text, json, junit, grouped, github, gitlab, pylint]
101
- statistics: Show counts for every rule with at least one violation
102
- add_noqa: Enable automatic additions of `noqa` directives to failing lines
103
- show_files: See the files Ruff will be run against with the current settings
104
- show_settings: See the settings Ruff will use to lint a given Python file
105
- select: Comma-separated list of rule codes to enable (or ALL, to enable all rules)
106
- ignore: Comma-separated list of rule codes to disable
107
- extend_select: Like --select, but adds additional rule codes on top of the selected ones
108
- per_file_ignores: List of mappings from file pattern to code to exclude
109
- fixable: List of rule codes to treat as eligible for autofix. Only applicable when autofix itself is enabled (e.g., via `--fix`)
110
- unfixable: List of rule codes to treat as ineligible for autofix. Only applicable when autofix itself is enabled (e.g., via `--fix`)
111
- exclude: List of paths, used to omit files and/or directories from analysis
112
- extend_exclude: Like --exclude, but adds additional files and directories on top of those already excluded
113
- respect_gitignore: Respect file exclusions via `.gitignore` and other standard ignore files
114
- force_exclude: Enforce exclusions, even for paths passed to Ruff directly on the command-line
115
- no_cache: Disable cache reads
116
- isolated: Ignore all configuration files
117
- cache_dir: Path to the cache directory [env: RUFF_CACHE_DIR=]
118
- stdin_filename: The name of the file when passing it through stdin
119
- exit_zero: Exit with status code "0", even upon detecting lint violations
120
- exit_non_zero_on_fix: Exit with a non-zero status code if any files were modified via autofix, even if no lint violations remain
93
+ fix: Attempt to automatically fix lint violations.
94
+ config: Path to the `pyproject.toml` or `ruff.toml` file to use for configuration.
95
+ show_source: Show violations with source code.
96
+ show_fixes: Show an enumeration of all autofixed lint violations.
97
+ diff: Avoid writing any fixed files back; instead, output a diff for each changed file to stdout.
98
+ watch: Run in watch mode by re-running whenever files change.
99
+ fix_only: Fix any fixable lint violations, but don't report on leftover violations. Implies `--fix`.
100
+ output_format: Output serialization format for violations (env: RUFF_FORMAT=) (possible values: text, json, junit, grouped, github, gitlab, pylint).
101
+ statistics: Show counts for every rule with at least one violation.
102
+ add_noqa: Enable automatic additions of `noqa` directives to failing lines.
103
+ show_files: See the files Ruff will be run against with the current settings.
104
+ show_settings: See the settings Ruff will use to lint a given Python file.
105
+ select: Comma-separated list of rule codes to enable (or ALL, to enable all rules).
106
+ ignore: Comma-separated list of rule codes to disable.
107
+ extend_select: Like --select, but adds additional rule codes on top of the selected ones.
108
+ per_file_ignores: List of mappings from file pattern to code to exclude.
109
+ fixable: List of rule codes to treat as eligible for autofix. Only applicable when autofix itself is enabled (e.g., via `--fix`).
110
+ unfixable: List of rule codes to treat as ineligible for autofix. Only applicable when autofix itself is enabled (e.g., via `--fix`).
111
+ exclude: List of paths, used to omit files and/or directories from analysis.
112
+ extend_exclude: Like --exclude, but adds additional files and directories on top of those already excluded.
113
+ respect_gitignore: Respect file exclusions via `.gitignore` and other standard ignore files.
114
+ force_exclude: Enforce exclusions, even for paths passed to Ruff directly on the command-line.
115
+ no_cache: Disable cache reads.
116
+ isolated: Ignore all configuration files.
117
+ cache_dir: Path to the cache directory (env: RUFF_CACHE_DIR=).
118
+ stdin_filename: The name of the file when passing it through stdin.
119
+ exit_zero: Exit with status code "0", even upon detecting lint violations.
120
+ exit_non_zero_on_fix: Exit with a non-zero status code if any files were modified via autofix, even if no lint violations remain.
121
121
  verbose: Enable verbose logging.
122
122
  quiet: Print lint violations, but nothing else.
123
123
  silent: Disable all logging (but still exit with status code "1" upon detecting lint violations).
@@ -368,7 +368,7 @@ def linter(
368
368
  """List all supported upstream linters.
369
369
 
370
370
  Parameters:
371
- output_format: Output format [default: pretty] [possible values: text, json, pretty].
371
+ output_format: Output format (default: pretty) (possible values: text, json, pretty).
372
372
  verbose: Enable verbose logging.
373
373
  quiet: Print lint violations, but nothing else.
374
374
  silent: Disable all logging (but still exit with status code "1" upon detecting lint violations).
@@ -29,6 +29,7 @@ class blacken_docs(Tool): # noqa: N801
29
29
  magic_trailing_comma: bool = True,
30
30
  python_cell_magics: set[str] | None = None,
31
31
  preview: bool = False,
32
+ check_only: bool = False,
32
33
  ) -> None:
33
34
  """Run `blacken-docs`.
34
35
 
@@ -49,6 +50,8 @@ class blacken_docs(Tool): # noqa: N801
49
50
  Useful for formatting cells with custom python magics.
50
51
  preview: Enable potentially disruptive style changes that may be added
51
52
  to Black's main functionality in the next major release.
53
+ check_only: Don't modify files but indicate when changes are necessary
54
+ with a message and non-zero return code.
52
55
 
53
56
  Returns:
54
57
  Success/failure.
@@ -77,6 +80,7 @@ class blacken_docs(Tool): # noqa: N801
77
80
  preview = self.py_args["preview"]
78
81
  skip_errors = self.py_args["skip_errors"]
79
82
  rst_literal_blocks = self.py_args["rst_literal_blocks"]
83
+ check_only = self.py_args["check_only"]
80
84
 
81
85
  # Build filepaths.
82
86
  exts = ("md", "py") if exts is None else tuple(ext.lstrip(".") for ext in exts)
@@ -111,5 +115,6 @@ class blacken_docs(Tool): # noqa: N801
111
115
  black_mode,
112
116
  skip_errors=skip_errors,
113
117
  rst_literal_blocks=rst_literal_blocks,
118
+ check_only=check_only,
114
119
  )
115
120
  return retv
duty/tools/_ruff.py CHANGED
@@ -1,4 +1,4 @@
1
- """Callable for [Ruff](https://github.com/charliermarsh/ruff)."""
1
+ """Callable for [Ruff](https://github.com/astral-sh/ruff)."""
2
2
 
3
3
  from __future__ import annotations
4
4
 
@@ -31,7 +31,7 @@ def _find_ruff() -> str:
31
31
 
32
32
 
33
33
  class ruff(Tool): # noqa: N801
34
- """Call [Ruff](https://github.com/charliermarsh/ruff)."""
34
+ """Call [Ruff](https://github.com/astral-sh/ruff)."""
35
35
 
36
36
  cli_name = "ruff"
37
37
 
@@ -74,34 +74,34 @@ class ruff(Tool): # noqa: N801
74
74
  """Run Ruff on the given files or directories.
75
75
 
76
76
  Parameters:
77
- fix: Attempt to automatically fix lint violations
78
- config: Path to the `pyproject.toml` or `ruff.toml` file to use for configuration
79
- show_source: Show violations with source code
80
- show_fixes: Show an enumeration of all autofixed lint violations
81
- diff: Avoid writing any fixed files back; instead, output a diff for each changed file to stdout
82
- watch: Run in watch mode by re-running whenever files change
83
- fix_only: Fix any fixable lint violations, but don't report on leftover violations. Implies `--fix`
84
- output_format: Output serialization format for violations [env: RUFF_FORMAT=] [possible values: text, json, junit, grouped, github, gitlab, pylint]
85
- statistics: Show counts for every rule with at least one violation
86
- add_noqa: Enable automatic additions of `noqa` directives to failing lines
87
- show_files: See the files Ruff will be run against with the current settings
88
- show_settings: See the settings Ruff will use to lint a given Python file
89
- select: Comma-separated list of rule codes to enable (or ALL, to enable all rules)
90
- ignore: Comma-separated list of rule codes to disable
91
- extend_select: Like --select, but adds additional rule codes on top of the selected ones
92
- per_file_ignores: List of mappings from file pattern to code to exclude
93
- fixable: List of rule codes to treat as eligible for autofix. Only applicable when autofix itself is enabled (e.g., via `--fix`)
94
- unfixable: List of rule codes to treat as ineligible for autofix. Only applicable when autofix itself is enabled (e.g., via `--fix`)
95
- exclude: List of paths, used to omit files and/or directories from analysis
96
- extend_exclude: Like --exclude, but adds additional files and directories on top of those already excluded
97
- respect_gitignore: Respect file exclusions via `.gitignore` and other standard ignore files
98
- force_exclude: Enforce exclusions, even for paths passed to Ruff directly on the command-line
99
- no_cache: Disable cache reads
100
- isolated: Ignore all configuration files
101
- cache_dir: Path to the cache directory [env: RUFF_CACHE_DIR=]
102
- stdin_filename: The name of the file when passing it through stdin
103
- exit_zero: Exit with status code "0", even upon detecting lint violations
104
- exit_non_zero_on_fix: Exit with a non-zero status code if any files were modified via autofix, even if no lint violations remain
77
+ fix: Attempt to automatically fix lint violations.
78
+ config: Path to the `pyproject.toml` or `ruff.toml` file to use for configuration.
79
+ show_source: Show violations with source code.
80
+ show_fixes: Show an enumeration of all autofixed lint violations.
81
+ diff: Avoid writing any fixed files back; instead, output a diff for each changed file to stdout.
82
+ watch: Run in watch mode by re-running whenever files change.
83
+ fix_only: Fix any fixable lint violations, but don't report on leftover violations. Implies `--fix`.
84
+ output_format: Output serialization format for violations (env: RUFF_FORMAT=) (possible values: text, json, junit, grouped, github, gitlab, pylint).
85
+ statistics: Show counts for every rule with at least one violation.
86
+ add_noqa: Enable automatic additions of `noqa` directives to failing lines.
87
+ show_files: See the files Ruff will be run against with the current settings.
88
+ show_settings: See the settings Ruff will use to lint a given Python file.
89
+ select: Comma-separated list of rule codes to enable (or ALL, to enable all rules).
90
+ ignore: Comma-separated list of rule codes to disable.
91
+ extend_select: Like --select, but adds additional rule codes on top of the selected ones.
92
+ per_file_ignores: List of mappings from file pattern to code to exclude.
93
+ fixable: List of rule codes to treat as eligible for autofix. Only applicable when autofix itself is enabled (e.g., via `--fix`).
94
+ unfixable: List of rule codes to treat as ineligible for autofix. Only applicable when autofix itself is enabled (e.g., via `--fix`).
95
+ exclude: List of paths, used to omit files and/or directories from analysis.
96
+ extend_exclude: Like --exclude, but adds additional files and directories on top of those already excluded.
97
+ respect_gitignore: Respect file exclusions via `.gitignore` and other standard ignore files.
98
+ force_exclude: Enforce exclusions, even for paths passed to Ruff directly on the command-line.
99
+ no_cache: Disable cache reads.
100
+ isolated: Ignore all configuration files.
101
+ cache_dir: Path to the cache directory (env: RUFF_CACHE_DIR=).
102
+ stdin_filename: The name of the file when passing it through stdin.
103
+ exit_zero: Exit with status code "0", even upon detecting lint violations.
104
+ exit_non_zero_on_fix: Exit with a non-zero status code if any files were modified via autofix, even if no lint violations remain.
105
105
  verbose: Enable verbose logging.
106
106
  quiet: Print lint violations, but nothing else.
107
107
  silent: Disable all logging (but still exit with status code "1" upon detecting lint violations).
@@ -390,7 +390,7 @@ class ruff(Tool): # noqa: N801
390
390
  """List all supported upstream linters.
391
391
 
392
392
  Parameters:
393
- output_format: Output format [default: pretty] [possible values: text, json, pretty].
393
+ output_format: Output format (default: pretty) (possible values: text, json, pretty).
394
394
  verbose: Enable verbose logging.
395
395
  quiet: Print lint violations, but nothing else.
396
396
  silent: Disable all logging (but still exit with status code "1" upon detecting lint violations).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: duty
3
- Version: 1.4.1
3
+ Version: 1.4.2
4
4
  Summary: A simple task runner.
5
5
  Keywords: task-runner,task,runner,cross-platform
6
6
  Author-Email: =?utf-8?q?Timoth=C3=A9e_Mazzucotelli?= <dev@pawamoy.fr>
@@ -1,14 +1,14 @@
1
- duty-1.4.1.dist-info/METADATA,sha256=1wigefIsobyKgAGeOPfdCJj6Ni4ZK9CfK3oW1ZQGE8o,2900
2
- duty-1.4.1.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
3
- duty-1.4.1.dist-info/entry_points.txt,sha256=gxDUGvj_bg7DA77MogNmnGQSc2__ri9kAEp2RJ1p60Q,40
4
- duty-1.4.1.dist-info/licenses/LICENSE,sha256=nQxdYSduhkgEpOTmg4yyIMmFPzcr2qrlUl8Tf9QZPug,754
1
+ duty-1.4.2.dist-info/METADATA,sha256=KlculFrWoh28QsweZPTaRzFqO03YW0pwozgrGCZbhhw,2900
2
+ duty-1.4.2.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
3
+ duty-1.4.2.dist-info/entry_points.txt,sha256=gxDUGvj_bg7DA77MogNmnGQSc2__ri9kAEp2RJ1p60Q,40
4
+ duty-1.4.2.dist-info/licenses/LICENSE,sha256=nQxdYSduhkgEpOTmg4yyIMmFPzcr2qrlUl8Tf9QZPug,754
5
5
  duty/__init__.py,sha256=2fdBMNEBXYSCnV1GQm56VGe8VuvMp79-Hj3SHrAb5MM,144
6
6
  duty/__main__.py,sha256=4YvloGDKmyVzOsE6ZdyCQyY0Jsl0LSlbqkO2UDExgmI,333
7
7
  duty/callables/__init__.py,sha256=R42f1qpIy7m2MMbs6Xc_OnQiEARr4g2Pghpp9ry4JFI,1042
8
8
  duty/callables/_io.py,sha256=vrMLd7ggCFDy8coWUqntmxgKC9BvFu8smK4pK2S7EeA,367
9
9
  duty/callables/autoflake.py,sha256=5IUL2TUfrbWUs_-TBjzqsSHJOxGFiGtBuWBV6AIYdu4,4699
10
10
  duty/callables/black.py,sha256=c2gWuhESEWRi1JGKAlMF_ZLoVJ5_bHLd7c4Lg0qyuX8,7153
11
- duty/callables/blacken_docs.py,sha256=Ydd5Xhyo9LX9BCaSa5LwC2_76iG0TtA-LrrPFjSk3z8,3221
11
+ duty/callables/blacken_docs.py,sha256=P0lyXg_txxdIwr1qGuzeop1Plb1R8FMkRIo46O0BkgQ,3418
12
12
  duty/callables/build.py,sha256=_cF8B3HKy3BWsTSLfpKwhxkZ0JVhfB3v1Zh2eO1FnQw,2150
13
13
  duty/callables/coverage.py,sha256=3F2DeHyB-L-Y4v_qJU3TIGPNISnX_Nwn79JtmdE-a-0,23843
14
14
  duty/callables/flake8.py,sha256=3uqFdZUF3B35Zc-otjrZfUQgEQkQ3ecZd0ZlEH83sZc,8476
@@ -19,7 +19,7 @@ duty/callables/isort.py,sha256=WutuLM1CZiobHK4Kl2N22xbZg7d0JU6MBZV2muvyG94,26437
19
19
  duty/callables/mkdocs.py,sha256=laaToR_KGsPYX7zcVa9u0fC7mMbKR5PYi5g_5pBW_J8,7902
20
20
  duty/callables/mypy.py,sha256=qtdOxX4x1VeEXCgY_Mw9EzKs0flBU86Ih4PKgf1WyT4,19797
21
21
  duty/callables/pytest.py,sha256=GJHRZCeRhItqOA-ikcFmr9WdpN7ohwTRIIgKl7pWKyw,18345
22
- duty/callables/ruff.py,sha256=kK4FtxEZSz5D3Evc-BLpk1GscR73m4kpXHeacC7plPc,13312
22
+ duty/callables/ruff.py,sha256=jyRo23J4qNLjUGSfRqOYqpbv7DYaxBqfvsBzO88caWA,13336
23
23
  duty/callables/safety.py,sha256=sTjBad1y3Cly__QOT_z29e8KD4YOPi9FFAV1UlW-niM,2389
24
24
  duty/callables/ssort.py,sha256=Lqak-xfJtKkj3AaI4_jPeaRkZ9SbvMCYhoUIVVHE6s8,842
25
25
  duty/callables/twine.py,sha256=hsp8TcOYlbHCCqRwglDmNHS55LdnXFd-n2tFaJkMafs,9511
@@ -34,7 +34,7 @@ duty/tools/__init__.py,sha256=soQxh0HEwSV5zZhfv5DEIpBonk53-JRE0YvcXfWvPI8,1179
34
34
  duty/tools/_autoflake.py,sha256=wDqNyfuC6rju9LqyTTimaQZs_8v7YvYECzdltO5rof0,5285
35
35
  duty/tools/_base.py,sha256=MpjsSguxu_O6HAOkIy0hZdP2RkguS-NGVhYQHPnurWA,1474
36
36
  duty/tools/_black.py,sha256=avo5-J2gHeXlOneYC0j1PSV7J-QFfPFUTdbwczsMvrA,7907
37
- duty/tools/_blacken_docs.py,sha256=OgOSBINydrwLoITy4aoYulaQ7yE4-wCzAZ8ILN5GFng,4632
37
+ duty/tools/_blacken_docs.py,sha256=GZvGjPY5Fx6mnZYRwGUB6inH2WQEBkptwPkfWLqSCyY,4893
38
38
  duty/tools/_build.py,sha256=QbOZzeR9T_mWkF9poalOkCWuYe22E1liMUC7aBQTJ5k,2567
39
39
  duty/tools/_coverage.py,sha256=UKCu-DLyW_-en_Hn9qsh4kXyfrL7DK82VOw9Hblkh_g,26341
40
40
  duty/tools/_flake8.py,sha256=ZmV_1Hy773fzP40LDNmj8YJslWatldl0qfr_g2pcgrI,9371
@@ -45,9 +45,9 @@ duty/tools/_isort.py,sha256=VbQbK4iPVNWNYlmOPDEnEcFVB6fJ66W-8s36bS9HziQ,28352
45
45
  duty/tools/_mkdocs.py,sha256=GfhXUScTjGQK5Djg6fAGtLSSssdbhebL2AonG5FGPV0,9027
46
46
  duty/tools/_mypy.py,sha256=6La6BTfTfMlpA4-JO8dn1O0QQ1zaVEUEp5M6cRmPr7k,21555
47
47
  duty/tools/_pytest.py,sha256=HG5jmRbdCKMK6-6i8cDd4MZ1CsDhHa0TQyjls0vy1WU,20064
48
- duty/tools/_ruff.py,sha256=g8zh9LLEql5ZV-0wAQMc_XjUcsOm9Euz_M-oGJtvWts,15226
48
+ duty/tools/_ruff.py,sha256=bsj2CcKFEb4A-4lko9Lxc_KNTks74Q902AxImRqBUCs,15246
49
49
  duty/tools/_safety.py,sha256=3kQOko-z07w8S-zq3Qs1FdVXSdY3F13QgRsx1NPPxOg,3141
50
50
  duty/tools/_ssort.py,sha256=xhh5eYq16BC8KTSKDCxA10mR8RZoQuN10-xUjhu3QlE,1097
51
51
  duty/tools/_twine.py,sha256=9y7-X9fqZ6wbOddGtxBMePI7hgq9QldYyMHxRBy_JXg,10347
52
52
  duty/validation.py,sha256=NbinkhQGsfnL4ZqjMoWZgv5GxmNQ0qMDhE6pWxLxuM4,8183
53
- duty-1.4.1.dist-info/RECORD,,
53
+ duty-1.4.2.dist-info/RECORD,,
File without changes