-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fix ruff re errors #289
Fix ruff re errors #289
Conversation
@@ -190,7 +190,7 @@ def map_data_wrapper(self, expr: DataWrapper) -> Array: | |||
|
|||
# https://github.com/pylint-dev/pylint/issues/3893 | |||
# pylint: disable=unexpected-keyword-arg | |||
return DataWrapper( | |||
return DataWrapper( # type: ignore[call-arg] |
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.
I actually don't understand what mypy is complaining about here. shape
and data
are defined as dataclass attributes?
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.
Yeah, I really don't know either :\ I've stared a bit at the pytato code, but it's obviously fine. It's doubly surprising since those two attributes are actually in the class itself, not in a parent..
Definitely the same thing that's confusing pylint as well though.
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.
For what it's worth, doing a reveal_type(DataWrapper)
says
arraycontext/impl/pytato/utils.py:193: note: Revealed type is "def (*, axes: builtins.tuple[pytato.array.Axis, ...], tags: builtins.frozenset[pytools.tag.Tag], non_equality_tags: builtins.frozenset[pytools.tag.Tag] =) -> pytato.array.DataWrapper"
so for some reason it really doesn't think those arguments are there..
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.
Possibly related to this: python/mypy#17375
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.
Good find, thanks. Added that as context in a comment so we don't lose it.
No description provided.