Skip to content

Commit

Permalink
distutils: expose Command.dry_run + make 0|1 attrs bool (#12607)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam authored Aug 30, 2024
1 parent 4109c06 commit f87041e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions stdlib/distutils/cmd.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ _CommandT = TypeVar("_CommandT", bound=Command)
_Ts = TypeVarTuple("_Ts")

class Command:
dry_run: Literal[0, 1] # Exposed from __getattr_. Same as Distribution.dry_run
distribution: Distribution
# Any to work around variance issues
sub_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]]
Expand Down
6 changes: 3 additions & 3 deletions stdlib/distutils/dist.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ class Distribution:
display_options: ClassVar[_OptionsList]
display_option_names: ClassVar[list[str]]
negative_opt: ClassVar[dict[str, str]]
verbose: int
dry_run: int
help: int
verbose: Literal[0, 1]
dry_run: Literal[0, 1]
help: Literal[0, 1]
command_packages: list[str] | None
script_name: str | None
script_args: list[str] | None
Expand Down
1 change: 1 addition & 0 deletions stubs/setuptools/setuptools/_distutils/cmd.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ _CommandT = TypeVar("_CommandT", bound=Command)
_Ts = TypeVarTuple("_Ts")

class Command:
dry_run: bool # Exposed from __getattr_. Same as Distribution.dry_run
distribution: Distribution
# Any to work around variance issues
sub_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]]
Expand Down
6 changes: 3 additions & 3 deletions stubs/setuptools/setuptools/_distutils/dist.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ class Distribution:
display_options: ClassVar[_OptionsList]
display_option_names: ClassVar[list[str]]
negative_opt: ClassVar[dict[str, str]]
verbose: int
dry_run: int
help: int
verbose: bool
dry_run: bool
help: bool
command_packages: list[str] | None
script_name: str | None
script_args: list[str] | None
Expand Down

0 comments on commit f87041e

Please sign in to comment.