File tree Expand file tree Collapse file tree 8 files changed +27
-17
lines changed
stubs/setuptools/setuptools Expand file tree Collapse file tree 8 files changed +27
-17
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,12 @@ from _typeshed import Incomplete, Unused
2
2
from abc import abstractmethod
3
3
from collections .abc import Callable , Iterable
4
4
from distutils .dist import Distribution
5
- from typing import Any , Literal
5
+ from typing import Any , ClassVar , Literal
6
6
7
7
class Command :
8
8
distribution : Distribution
9
- sub_commands : list [tuple [str , Callable [[Command ], bool ] | None ]]
9
+ # Any to work around variance issues
10
+ sub_commands : ClassVar [list [tuple [str , Callable [[Any ], bool ] | None ]]]
10
11
def __init__ (self , dist : Distribution ) -> None : ...
11
12
@abstractmethod
12
13
def initialize_options (self ) -> None : ...
Original file line number Diff line number Diff line change 1
- from typing import Any
1
+ from collections .abc import Callable
2
+ from typing import Any , ClassVar
2
3
3
4
from ..cmd import Command
4
5
@@ -28,4 +29,5 @@ class build(Command):
28
29
def has_c_libraries (self ): ...
29
30
def has_ext_modules (self ): ...
30
31
def has_scripts (self ): ...
31
- sub_commands : Any
32
+ # Any to work around variance issues
33
+ sub_commands : ClassVar [list [tuple [str , Callable [[Any ], bool ] | None ]]]
Original file line number Diff line number Diff line change 1
- from typing import Any
1
+ from collections .abc import Callable
2
+ from typing import Any , ClassVar
2
3
3
4
from ..cmd import Command
4
5
@@ -60,4 +61,5 @@ class install(Command):
60
61
def has_headers (self ): ...
61
62
def has_scripts (self ): ...
62
63
def has_data (self ): ...
63
- sub_commands : Any
64
+ # Any to work around variance issues
65
+ sub_commands : ClassVar [list [tuple [str , Callable [[Any ], bool ] | None ]]]
Original file line number Diff line number Diff line change 1
- from typing import Any
1
+ from collections .abc import Callable
2
+ from typing import Any , ClassVar
2
3
3
4
from ..config import PyPIRCCommand
4
5
5
6
class register (PyPIRCCommand ):
6
7
description : str
7
- sub_commands : Any
8
+ # Any to work around variance issues
9
+ sub_commands : ClassVar [list [tuple [str , Callable [[Any ], bool ] | None ]]]
8
10
list_classifiers : int
9
11
strict : int
10
12
def initialize_options (self ) -> None : ...
Original file line number Diff line number Diff line change 1
- from typing import Any
1
+ from collections .abc import Callable
2
+ from typing import Any , ClassVar
2
3
3
4
from ..cmd import Command
4
5
@@ -11,7 +12,8 @@ class sdist(Command):
11
12
boolean_options : Any
12
13
help_options : Any
13
14
negative_opt : Any
14
- sub_commands : Any
15
+ # Any to work around variance issues
16
+ sub_commands : ClassVar [list [tuple [str , Callable [[Any ], bool ] | None ]]]
15
17
READMES : Any
16
18
template : Any
17
19
manifest : Any
Original file line number Diff line number Diff line change 1
1
from _typeshed import Incomplete , Unused
2
2
from abc import abstractmethod
3
3
from collections .abc import Callable , Iterable
4
- from typing import ClassVar , Literal
5
- from typing_extensions import Self
4
+ from typing import Any , ClassVar , Literal
6
5
7
6
from .dist import Distribution
8
7
9
8
class Command :
10
9
distribution : Distribution
11
- sub_commands : ClassVar [list [tuple [str , Callable [[Self ], bool ] | None ]]]
10
+ # Any to work around variance issues
11
+ sub_commands : ClassVar [list [tuple [str , Callable [[Any ], bool ] | None ]]]
12
12
def __init__ (self , dist : Distribution ) -> None : ...
13
13
def ensure_finalized (self ) -> None : ...
14
14
@abstractmethod
Original file line number Diff line number Diff line change
1
+ from collections .abc import Callable
1
2
from typing import Any
2
3
3
4
from .._distutils .command import install as orig
4
5
5
6
class install (orig .install ):
6
7
user_options : Any
7
8
boolean_options : Any
8
- new_commands : Any
9
+ # Any to work around variance issues
10
+ new_commands : list [tuple [str , Callable [[Any ], bool ]] | None ]
9
11
old_and_unmanageable : Any
10
12
single_version_externally_managed : Any
11
13
def initialize_options (self ) -> None : ...
Original file line number Diff line number Diff line change 1
1
from collections .abc import Callable
2
2
from typing import Any , ClassVar
3
- from typing_extensions import Self
4
3
5
4
from .upload import upload
6
5
@@ -10,8 +9,8 @@ class upload_docs(upload):
10
9
user_options : ClassVar [list [tuple [str , str | None , str ]]]
11
10
boolean_options : ClassVar [list [str ]]
12
11
def has_sphinx (self ): ...
13
- # The callable parameter is self: Self, but using Self still trips up mypy
14
- sub_commands : ClassVar [list [tuple [str , Callable [[Self ], bool ] | None ]]] # type: ignore[assignment ]
12
+ # Any to work around variance issues
13
+ sub_commands : ClassVar [list [tuple [str , Callable [[Any ], bool ] | None ]]]
15
14
upload_dir : Any
16
15
target_dir : Any
17
16
def initialize_options (self ) -> None : ...
You can’t perform that action at this time.
0 commit comments