-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
false not-an-iterable for __truediv__ with @overload #2448
Comments
I'd hoped this was fixed by #1015, but alas no. It is specific to |
rbrazinskas
added a commit
to iqm-finland/cirq-on-iqm
that referenced
this issue
May 23, 2024
There has been a recent regression in astroid module (since version 3.2.0, most likely related to changes in igetattr method). It causes our CI workflows runs to fail. astroid is a transitive dependency (pytest-pylint <- pylint <- astroid). Versions of transitive dependencies are not pinned in the project configuration, which allowed astroid regression to break the CI. pylint checks should be re-enabled once astroid bug pylint-dev/astroid#2448 gets fixed.
rbrazinskas
added a commit
to iqm-finland/cirq-on-iqm
that referenced
this issue
May 23, 2024
There has been a recent regression in astroid module (since version 3.2.0, most likely related to changes in igetattr method). It causes our CI workflows runs to fail. astroid is a transitive dependency (pytest-pylint <- pylint <- astroid). Versions of transitive dependencies are not pinned in the project configuration, which allowed astroid regression to break the CI. pylint checks should be re-enabled once astroid bug pylint-dev/astroid#2448 gets fixed.
I see something similar with: from typing import overload, Iterator, Union
class Sequence:
def __init__(self, data: list[str]) -> None:
self._data = data
@overload
def __getitem__(self, idx: int) -> str:
...
@overload
def __getitem__(self, idx: slice) -> "Sequence":
...
def __getitem__(self, idx: Union[int, slice]) -> Union[str, "Sequence"]:
if isinstance(idx, slice):
return self.__class__(*self._data[idx])
else:
return self._data[idx]
s = Sequence(["a", "b"])
print(s[0].upper()) where pylint complains: For my real code (implementation, usage) this only started happening with pylint 3.2.1 and astroid 3.2.2 (but not 3.1.x). However, the minimal example seems to show the error even in older versions. |
The-Compiler
added a commit
to qutebrowser/qutebrowser
that referenced
this issue
May 24, 2024
- Add a couple new "raise utils.Unreachable" to avoid possibly-used-before-assignment issues. - Simplify an "if" for the same reason - Remove an unneeded "return" - Use "NoReturn" to prepare for pylint knowing about it in the future: pylint-dev/pylint#9674 - Add some ignores for used-before-assignment false-positives - Ignore new undefined-variable messages for Qt wrapers - Ignore a new no-member warning for KeySequence: pylint-dev/astroid#2448 (comment)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
Current behavior
Expected behavior
No error.
python -c "from astroid import __pkginfo__; print(__pkginfo__.version)"
output3.2.2
The text was updated successfully, but these errors were encountered: