You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Heya, after this commit: 29ec9c3,
mypy (and I imagine other static analysers) can no longer determine that the EntryPoint has name, value and group attributes.
Yes. You can try making that change and you'll see the tests fail. __setattr__ is overridden to make the object immutable.
I'd really like to see the mypy add support similar to NamedTuple for this use-case.
Do you know of a way to fix this issue? I know in #342, Anders is working on enabling strict type checking on this project. But that issue is currently blocked on mypy being unable to support dynamic constructs like always_iterable and rebasing on this recent refactor.
Perhaps the reported issue here could be solved by adding type directives to the class properties, but without a repro, I'm not even sure how to test for expected behavior.
Feel free to follow up with a repro or proposed patch. In the meantime, I'll close this as answered.
Activity
jaraco commentedon Sep 13, 2021
Yes. You can try making that change and you'll see the tests fail.
__setattr__is overridden to make the object immutable.I'd really like to see the mypy add support similar to
NamedTuplefor this use-case.Do you know of a way to fix this issue? I know in #342, Anders is working on enabling strict type checking on this project. But that issue is currently blocked on mypy being unable to support dynamic constructs like
always_iterableand rebasing on this recent refactor.Perhaps the reported issue here could be solved by adding type directives to the class properties, but without a repro, I'm not even sure how to test for expected behavior.
Feel free to follow up with a repro or proposed patch. In the meantime, I'll close this as answered.