-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ANN: types for _create_storer #29757
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
Conversation
jbrockmendel
commented
Nov 20, 2019
- Annotate return type for _create_storer
- Annotate other functions that we can reason about given 1
- Fixups to address mypy warnings caused by 1 and 2
except KeyError: | ||
error("_TYPE_MAP") | ||
raise error("_TYPE_MAP") |
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.
will this make sense now that _TYPE_MAP is inlined?
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 guess we could inline the thing here too
@jbrockmendel looking good. |
In this case I think they're better kept as the Union. In a perfect world id like to get separate functions one of which returns Table and the other returns GenericFixed, but i couldn't come up with a nice way of pre-checking |
i think i merged in an odd order, pls rebase |
merged lots of stuff, can you rebase just to be sure here. |
rebased+green |
where=where, start=start, stop=stop, **kwargs | ||
) | ||
tbl = self.get_storer(key) | ||
if not isinstance(tbl, Table): |
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.
Does doing this solve a bug?
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.
mypy mostly. get_storer can return two different types, and this method only works if we get a Table back
k thanks |