-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg_resources
: Remove stray Any
s and use more Self
& NoReturn
types
#11528
pkg_resources
: Remove stray Any
s and use more Self
& NoReturn
types
#11528
Conversation
|
||
class ResolutionError(Exception): ... | ||
|
||
class DistributionNotFound(ResolutionError): | ||
def __init__(self, req: Requirement, requirers: set[str] | None, /, *args: object) -> None: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ResolutionError
subclasses still work with any number of arguments which will show up in the __repr__
string
This comment has been minimized.
This comment has been minimized.
@@ -333,7 +333,7 @@ class NullProvider: | |||
def metadata_isdir(self, name: str) -> bool: ... | |||
def resource_listdir(self, resource_name) -> list[str]: ... | |||
def metadata_listdir(self, name: str) -> list[str]: ... | |||
def run_script(self, script_name: str, namespace: Mapping[str, object]) -> None: ... | |||
def run_script(self, script_name: str, namespace: dict[str, Any]) -> None: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taken from
Lines 1330 to 1331 in 35b74bc
__globals: dict[str, Any] | None = None, | |
__locals: Mapping[str, object] | None = None, |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Extracted from, and improved over #11455
Works towards #9550