-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
REF: cython cleanup, typing, optimizations #23464
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
@@ -259,7 +259,7 @@ def ismember_{{dtype}}({{scalar}}[:] arr, {{scalar}}[:] values): | |||
{{if dtype == 'object'}} | |||
for i in range(n): | |||
val = arr[i] | |||
k = kh_get_{{ttype}}(table, <PyObject*> val) | |||
k = kh_get_{{ttype}}(table, <PyObject*>val) |
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.
are actually linting this? iirc these were changed to add the space last year. i don’t care which way but we should have 1 true way
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'm not aware of a way to lint for this.
I've been pretty consistent about no-space, so at this point that constitutes a pretty large majority of existing cases.
cimport cython | ||
from cython cimport Py_ssize_t | ||
import cython | ||
from cython import Py_ssize_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.
does this actually matter?
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.
No. Only difference is one is valid python, getting us one step closer to being able to lint
return util.is_integer_object(obj) | ||
|
||
|
||
def is_bool(obj: object) -> bint: | ||
def is_bool(obj: object) -> bool: |
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.
why are these changing? what is wrong with bint?
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.
nothing is wrong with bint, but part of the upside of using py3-annotations is that its valid python. using bint instead of bool defeats that purpose
Travis failure is for (new?) linting in docs/ and scripts/ |
thanks |
* Easy bits of pandas-dev#23382 * Easy parts of pandas-dev#23368
* Easy bits of pandas-dev#23382 * Easy parts of pandas-dev#23368
* Easy bits of pandas-dev#23382 * Easy parts of pandas-dev#23368
* Easy bits of pandas-dev#23382 * Easy parts of pandas-dev#23368
Splitting out more easy parts of #23382, #23368