-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
CLN: Static types in pandas/_lib/lib.pyx
#33329
CLN: Static types in pandas/_lib/lib.pyx
#33329
Conversation
pandas/_libs/lib.pyx
Outdated
@@ -103,12 +103,10 @@ def memory_usage_of_objects(arr: object[:]) -> int64_t: | |||
|
|||
Does not include the actual bytes of the pointers | |||
""" | |||
i: Py_ssize_t | |||
n: Py_ssize_t | |||
size: int64_t |
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.
we put this in because it is consistent with pure-python syntax
pandas/_libs/lib.pyx
Outdated
'interval': 'interval', | ||
} | ||
cdef: | ||
dict _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.
do we actually get anything from typing this?
one of the pie-in-the-sky goals is to get the cython code close enough to valid python that we can make flake8 work on it; this is going in the other direction
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.
do we actually get anything from typing this?
I looked at the generated C code, and it looks like we don't gain anything from typing this, I assumed we did, but I guess not.
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.
lgtm
Thanks @MomIsBestFriend |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff