We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
The signature of Logger.getChild is
Logger.getChild
def getChild(self, suffix: str) -> Logger: ...
However, this fails if one subclasses Logger, e.g. the following code
Logger
logger = MyLogger(...) child: MyLogger = logger.getChild(...)
Raises type[assignment] error (expression has type "Logger", variable has type "MyLogger"). The signature should be
type[assignment]
def getChild(self: T, suffix: str) -> T: ...
where T = TypeVar('T', bound=Logger). Cf. python/mypy#1212 and python/typing#980
T = TypeVar('T', bound=Logger)
The text was updated successfully, but these errors were encountered:
Fixes in #6609
Sorry, something went wrong.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
The signature of
Logger.getChild
isHowever, this fails if one subclasses
Logger
, e.g. the following codeRaises
type[assignment]
error (expression has type "Logger", variable has type "MyLogger"). The signature should bewhere
T = TypeVar('T', bound=Logger)
. Cf. python/mypy#1212 and python/typing#980The text was updated successfully, but these errors were encountered: