We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
from socket import socket class BaseBackend: pass class SystemProcess(BaseBackend): def __init__(self, single_process: bool = False) -> None: self.__sock = socket() if single_process else None def _prepare(self) -> None: pass class WafEventSyncer(SystemProcess): def __init__(self) -> None: super().__init__(single_process=True) self.__sock = socket() def _prepare(self) -> None: self.__sock.bind('something')
MyPy 1.11.2 Python 3.12
main.py:19: error: Item "None" of "socket | None" has no attribute "bind" [union-attr]
That's wrong because these are DIFFERENT private variables.
https://mypy-play.net/?mypy=latest&python=3.12&gist=e33bf8e0176b705bfbac32a7619638df
The text was updated successfully, but these errors were encountered:
Possible duplicate of #8267, which currently has an open PR: #16715
Sorry, something went wrong.
Closing as a duplicate of #8267
No branches or pull requests
MyPy 1.11.2
Python 3.12
That's wrong because these are DIFFERENT private variables.
https://mypy-play.net/?mypy=latest&python=3.12&gist=e33bf8e0176b705bfbac32a7619638df
The text was updated successfully, but these errors were encountered: