duty 1.4.1__py3-none-any.whl → 1.4.3__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.
- duty/callables/blacken_docs.py +9 -1
- duty/callables/ruff.py +32 -32
- duty/callables/safety.py +4 -1
- duty/collection.py +2 -2
- duty/context.py +5 -2
- duty/decorator.py +3 -1
- duty/tools/_blacken_docs.py +10 -1
- duty/tools/_ruff.py +33 -33
- duty/tools/_safety.py +4 -1
- duty/validation.py +5 -2
- {duty-1.4.1.dist-info → duty-1.4.3.dist-info}/METADATA +5 -9
- {duty-1.4.1.dist-info → duty-1.4.3.dist-info}/RECORD +15 -15
- {duty-1.4.1.dist-info → duty-1.4.3.dist-info}/WHEEL +1 -1
- {duty-1.4.1.dist-info → duty-1.4.3.dist-info}/entry_points.txt +2 -0
- {duty-1.4.1.dist-info → duty-1.4.3.dist-info}/licenses/LICENSE +0 -0
duty/callables/blacken_docs.py
CHANGED
|
@@ -4,10 +4,14 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import re
|
|
6
6
|
from pathlib import Path
|
|
7
|
-
from
|
|
7
|
+
from re import Pattern
|
|
8
|
+
from typing import TYPE_CHECKING
|
|
8
9
|
|
|
9
10
|
from failprint.lazy import lazy
|
|
10
11
|
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from collections.abc import Sequence
|
|
14
|
+
|
|
11
15
|
|
|
12
16
|
@lazy(name="blacken_docs")
|
|
13
17
|
def run(
|
|
@@ -24,6 +28,7 @@ def run(
|
|
|
24
28
|
magic_trailing_comma: bool = True,
|
|
25
29
|
python_cell_magics: set[str] | None = None,
|
|
26
30
|
preview: bool = False,
|
|
31
|
+
check_only: bool = False,
|
|
27
32
|
) -> int:
|
|
28
33
|
"""Run `blacken-docs`.
|
|
29
34
|
|
|
@@ -44,6 +49,8 @@ def run(
|
|
|
44
49
|
Useful for formatting cells with custom python magics.
|
|
45
50
|
preview: Enable potentially disruptive style changes that may be added
|
|
46
51
|
to Black's main functionality in the next major release.
|
|
52
|
+
check_only: Don't modify files but indicate when changes are necessary
|
|
53
|
+
with a message and non-zero return code.
|
|
47
54
|
|
|
48
55
|
Returns:
|
|
49
56
|
Success/failure.
|
|
@@ -80,5 +87,6 @@ def run(
|
|
|
80
87
|
black_mode,
|
|
81
88
|
skip_errors=skip_errors,
|
|
82
89
|
rst_literal_blocks=rst_literal_blocks,
|
|
90
|
+
check_only=check_only,
|
|
83
91
|
)
|
|
84
92
|
return retv
|
duty/callables/ruff.py
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"""Callable for [Ruff](https://github.com/
|
|
1
|
+
"""Callable for [Ruff](https://github.com/astral-sh/ruff)."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
6
|
import subprocess
|
|
7
7
|
import sys
|
|
8
|
-
from functools import
|
|
8
|
+
from functools import cache
|
|
9
9
|
|
|
10
10
|
from failprint.lazy import lazy
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
@
|
|
13
|
+
@cache
|
|
14
14
|
def _find_ruff() -> str:
|
|
15
15
|
from ruff.__main__ import find_ruff_bin
|
|
16
16
|
|
|
@@ -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
|
|
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
|
|
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
|
|
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).
|
duty/callables/safety.py
CHANGED
|
@@ -5,10 +5,13 @@ from __future__ import annotations
|
|
|
5
5
|
import importlib
|
|
6
6
|
import sys
|
|
7
7
|
from io import StringIO
|
|
8
|
-
from typing import
|
|
8
|
+
from typing import TYPE_CHECKING, Literal, cast
|
|
9
9
|
|
|
10
10
|
from failprint.lazy import lazy
|
|
11
11
|
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from collections.abc import Sequence
|
|
14
|
+
|
|
12
15
|
|
|
13
16
|
@lazy(name="safety.check")
|
|
14
17
|
def check(
|
duty/collection.py
CHANGED
|
@@ -6,11 +6,11 @@ import inspect
|
|
|
6
6
|
import sys
|
|
7
7
|
from copy import deepcopy
|
|
8
8
|
from importlib import util as importlib_util
|
|
9
|
-
from typing import Any, Callable, ClassVar,
|
|
9
|
+
from typing import Any, Callable, ClassVar, Union
|
|
10
10
|
|
|
11
11
|
from duty.context import Context
|
|
12
12
|
|
|
13
|
-
DutyListType =
|
|
13
|
+
DutyListType = list[Union[str, Callable, "Duty"]]
|
|
14
14
|
default_duties_file = "duties.py"
|
|
15
15
|
|
|
16
16
|
|
duty/context.py
CHANGED
|
@@ -4,14 +4,17 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
6
|
from contextlib import contextmanager, suppress
|
|
7
|
-
from typing import Any, Callable,
|
|
7
|
+
from typing import TYPE_CHECKING, Any, Callable, Union
|
|
8
8
|
|
|
9
9
|
from failprint.runners import run as failprint_run
|
|
10
10
|
|
|
11
11
|
from duty.exceptions import DutyFailure
|
|
12
12
|
from duty.tools import Tool
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
if TYPE_CHECKING:
|
|
15
|
+
from collections.abc import Iterator
|
|
16
|
+
|
|
17
|
+
CmdType = Union[str, list[str], Callable]
|
|
15
18
|
|
|
16
19
|
|
|
17
20
|
class Context:
|
duty/decorator.py
CHANGED
|
@@ -4,11 +4,13 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import inspect
|
|
6
6
|
from functools import wraps
|
|
7
|
-
from typing import TYPE_CHECKING, Any, Callable,
|
|
7
|
+
from typing import TYPE_CHECKING, Any, Callable, overload
|
|
8
8
|
|
|
9
9
|
from duty.collection import Duty, DutyListType
|
|
10
10
|
|
|
11
11
|
if TYPE_CHECKING:
|
|
12
|
+
from collections.abc import Iterable
|
|
13
|
+
|
|
12
14
|
from duty.context import Context
|
|
13
15
|
|
|
14
16
|
|
duty/tools/_blacken_docs.py
CHANGED
|
@@ -4,10 +4,14 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import re
|
|
6
6
|
from pathlib import Path
|
|
7
|
-
from
|
|
7
|
+
from re import Pattern
|
|
8
|
+
from typing import TYPE_CHECKING
|
|
8
9
|
|
|
9
10
|
from duty.tools._base import Tool
|
|
10
11
|
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from collections.abc import Sequence
|
|
14
|
+
|
|
11
15
|
|
|
12
16
|
class blacken_docs(Tool): # noqa: N801
|
|
13
17
|
"""Call [blacken-docs](https://github.com/adamchainz/blacken-docs)."""
|
|
@@ -29,6 +33,7 @@ class blacken_docs(Tool): # noqa: N801
|
|
|
29
33
|
magic_trailing_comma: bool = True,
|
|
30
34
|
python_cell_magics: set[str] | None = None,
|
|
31
35
|
preview: bool = False,
|
|
36
|
+
check_only: bool = False,
|
|
32
37
|
) -> None:
|
|
33
38
|
"""Run `blacken-docs`.
|
|
34
39
|
|
|
@@ -49,6 +54,8 @@ class blacken_docs(Tool): # noqa: N801
|
|
|
49
54
|
Useful for formatting cells with custom python magics.
|
|
50
55
|
preview: Enable potentially disruptive style changes that may be added
|
|
51
56
|
to Black's main functionality in the next major release.
|
|
57
|
+
check_only: Don't modify files but indicate when changes are necessary
|
|
58
|
+
with a message and non-zero return code.
|
|
52
59
|
|
|
53
60
|
Returns:
|
|
54
61
|
Success/failure.
|
|
@@ -77,6 +84,7 @@ class blacken_docs(Tool): # noqa: N801
|
|
|
77
84
|
preview = self.py_args["preview"]
|
|
78
85
|
skip_errors = self.py_args["skip_errors"]
|
|
79
86
|
rst_literal_blocks = self.py_args["rst_literal_blocks"]
|
|
87
|
+
check_only = self.py_args["check_only"]
|
|
80
88
|
|
|
81
89
|
# Build filepaths.
|
|
82
90
|
exts = ("md", "py") if exts is None else tuple(ext.lstrip(".") for ext in exts)
|
|
@@ -111,5 +119,6 @@ class blacken_docs(Tool): # noqa: N801
|
|
|
111
119
|
black_mode,
|
|
112
120
|
skip_errors=skip_errors,
|
|
113
121
|
rst_literal_blocks=rst_literal_blocks,
|
|
122
|
+
check_only=check_only,
|
|
114
123
|
)
|
|
115
124
|
return retv
|
duty/tools/_ruff.py
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"""Callable for [Ruff](https://github.com/
|
|
1
|
+
"""Callable for [Ruff](https://github.com/astral-sh/ruff)."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
6
|
import subprocess
|
|
7
7
|
import sys
|
|
8
|
-
from functools import
|
|
8
|
+
from functools import cache
|
|
9
9
|
|
|
10
10
|
from duty.tools._base import Tool
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
@
|
|
13
|
+
@cache
|
|
14
14
|
def _find_ruff() -> str:
|
|
15
15
|
from ruff.__main__ import find_ruff_bin
|
|
16
16
|
|
|
@@ -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/
|
|
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
|
|
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
|
|
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
|
|
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).
|
duty/tools/_safety.py
CHANGED
|
@@ -5,10 +5,13 @@ from __future__ import annotations
|
|
|
5
5
|
import importlib
|
|
6
6
|
import sys
|
|
7
7
|
from io import StringIO
|
|
8
|
-
from typing import
|
|
8
|
+
from typing import TYPE_CHECKING, Literal, cast
|
|
9
9
|
|
|
10
10
|
from duty.tools._base import Tool
|
|
11
11
|
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from collections.abc import Sequence
|
|
14
|
+
|
|
12
15
|
|
|
13
16
|
class safety(Tool): # noqa: N801
|
|
14
17
|
"""Call [Safety](https://github.com/pyupio/safety)."""
|
duty/validation.py
CHANGED
|
@@ -12,9 +12,12 @@ import textwrap
|
|
|
12
12
|
from contextlib import suppress
|
|
13
13
|
from functools import cached_property, partial
|
|
14
14
|
from inspect import Parameter, Signature, signature
|
|
15
|
-
from typing import Any, Callable, ForwardRef,
|
|
15
|
+
from typing import TYPE_CHECKING, Any, Callable, ForwardRef, Union, get_args, get_origin
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
if TYPE_CHECKING:
|
|
18
|
+
from collections.abc import Sequence
|
|
19
|
+
|
|
20
|
+
# YORE: EOL 3.9: Replace block with lines 6-13.
|
|
18
21
|
if sys.version_info < (3, 10):
|
|
19
22
|
from eval_type_backport import eval_type_backport as eval_type
|
|
20
23
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: duty
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.3
|
|
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>
|
|
@@ -10,12 +10,12 @@ Classifier: Intended Audience :: Developers
|
|
|
10
10
|
Classifier: Programming Language :: Python
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
19
|
Classifier: Topic :: Documentation
|
|
20
20
|
Classifier: Topic :: Software Development
|
|
21
21
|
Classifier: Topic :: Utilities
|
|
@@ -28,7 +28,7 @@ Project-URL: Issues, https://github.com/pawamoy/duty/issues
|
|
|
28
28
|
Project-URL: Discussions, https://github.com/pawamoy/duty/discussions
|
|
29
29
|
Project-URL: Gitter, https://gitter.im/duty/community
|
|
30
30
|
Project-URL: Funding, https://github.com/sponsors/pawamoy
|
|
31
|
-
Requires-Python: >=3.
|
|
31
|
+
Requires-Python: >=3.9
|
|
32
32
|
Requires-Dist: eval-type-backport; python_version < "3.10"
|
|
33
33
|
Requires-Dist: failprint!=1.0.0,>=0.11
|
|
34
34
|
Requires-Dist: typing-extensions>=4.0; python_version < "3.11"
|
|
@@ -39,7 +39,6 @@ Description-Content-Type: text/markdown
|
|
|
39
39
|
[](https://github.com/pawamoy/duty/actions?query=workflow%3Aci)
|
|
40
40
|
[](https://pawamoy.github.io/duty/)
|
|
41
41
|
[](https://pypi.org/project/duty/)
|
|
42
|
-
[](https://gitpod.io/#https://github.com/pawamoy/duty)
|
|
43
42
|
[](https://app.gitter.im/#/room/#duty:gitter.im)
|
|
44
43
|
|
|
45
44
|
A simple task runner.
|
|
@@ -50,17 +49,14 @@ Inspired by [Invoke](https://github.com/pyinvoke/invoke).
|
|
|
50
49
|
|
|
51
50
|
## Installation
|
|
52
51
|
|
|
53
|
-
With `pip`:
|
|
54
|
-
|
|
55
52
|
```bash
|
|
56
53
|
pip install duty
|
|
57
54
|
```
|
|
58
55
|
|
|
59
|
-
With [`
|
|
56
|
+
With [`uv`](https://docs.astral.sh/uv/):
|
|
60
57
|
|
|
61
58
|
```bash
|
|
62
|
-
|
|
63
|
-
pipx install duty
|
|
59
|
+
uv tool install duty
|
|
64
60
|
```
|
|
65
61
|
|
|
66
62
|
## Quick start
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
duty-1.4.
|
|
2
|
-
duty-1.4.
|
|
3
|
-
duty-1.4.
|
|
4
|
-
duty-1.4.
|
|
1
|
+
duty-1.4.3.dist-info/METADATA,sha256=v58pX-GBakOWoOGNVIUkNkkA66B3UcO1Zbjtm3yazyo,2710
|
|
2
|
+
duty-1.4.3.dist-info/WHEEL,sha256=pM0IBB6ZwH3nkEPhtcp50KvKNX-07jYtnb1g1m6Z4Co,90
|
|
3
|
+
duty-1.4.3.dist-info/entry_points.txt,sha256=XZTh9yTgC9GDFmNoVeOqgKT6BCMifkCToilIj77B9ss,55
|
|
4
|
+
duty-1.4.3.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=
|
|
11
|
+
duty/callables/blacken_docs.py,sha256=OMKrfIZ1ZN6_h8SFGCBcnFCnlonQkkuRY7Vl-B2eGB0,3497
|
|
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,22 +19,22 @@ 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=
|
|
23
|
-
duty/callables/safety.py,sha256=
|
|
22
|
+
duty/callables/ruff.py,sha256=ZBjl1_MxaZ1-atHVB6YOFNf3QAm6GTw7Xj3hX8jnofo,13314
|
|
23
|
+
duty/callables/safety.py,sha256=ClwwAnDdZFG71_Fbh5X2XEGSPI8PZRy4-Jz6zq2amV4,2454
|
|
24
24
|
duty/callables/ssort.py,sha256=Lqak-xfJtKkj3AaI4_jPeaRkZ9SbvMCYhoUIVVHE6s8,842
|
|
25
25
|
duty/callables/twine.py,sha256=hsp8TcOYlbHCCqRwglDmNHS55LdnXFd-n2tFaJkMafs,9511
|
|
26
26
|
duty/cli.py,sha256=9uca96F31uTzWJuREU0ReWGhXntvjQaoSW6ZkUxBTV4,8521
|
|
27
|
-
duty/collection.py,sha256=
|
|
28
|
-
duty/context.py,sha256=
|
|
27
|
+
duty/collection.py,sha256=Xp85w6R4Lxv9A3IcdG2ZRtOJdyf1CXSlYr6-N0wBzwo,6584
|
|
28
|
+
duty/context.py,sha256=YVF68a2w3SMEM0AsN1mBCvlOZ5jTEZ9OYCxDZvv_soI,3250
|
|
29
29
|
duty/debug.py,sha256=9stdqxNJ9zA2HWsYfmy3C9BrWOXLlHYRGsQ6dHfCUfM,2813
|
|
30
|
-
duty/decorator.py,sha256=
|
|
30
|
+
duty/decorator.py,sha256=3puIe45Q_5vOVXlr71eFayHS1Swz6YdNANHOnDnHDk0,2984
|
|
31
31
|
duty/exceptions.py,sha256=gTtqtqOiMroP5-83kC5jakuwBfYKpzCQHE9RWfAGRv0,358
|
|
32
32
|
duty/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
33
|
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=
|
|
37
|
+
duty/tools/_blacken_docs.py,sha256=szKBSsAfQNoZVzTxtm7bZd9bCFe-UzL65XM3MZUJoZI,4972
|
|
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=
|
|
49
|
-
duty/tools/_safety.py,sha256=
|
|
48
|
+
duty/tools/_ruff.py,sha256=LftbwvIahvjZQPc3ksLmP34a26dK22rafkpL7VQyoXc,15224
|
|
49
|
+
duty/tools/_safety.py,sha256=D0ID65aeSCx6ZG01jZVSik075YkojjoYb8DoRtaz4X8,3206
|
|
50
50
|
duty/tools/_ssort.py,sha256=xhh5eYq16BC8KTSKDCxA10mR8RZoQuN10-xUjhu3QlE,1097
|
|
51
51
|
duty/tools/_twine.py,sha256=9y7-X9fqZ6wbOddGtxBMePI7hgq9QldYyMHxRBy_JXg,10347
|
|
52
|
-
duty/validation.py,sha256=
|
|
53
|
-
duty-1.4.
|
|
52
|
+
duty/validation.py,sha256=z0CLIsc-2AYbh-zqm3XMhWwE9JlVYmIJkrbo_bjmqVw,8241
|
|
53
|
+
duty-1.4.3.dist-info/RECORD,,
|
|
File without changes
|