-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: assorted cleanups #29314
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: assorted cleanups #29314
Conversation
@datapythonista is there an easy way to run the docstring validation on non-public/non-API functions? here im thinking of tslibs.ccalendar (side-note, does the docstring validation check that type annotations match docstring parameters and return types?) |
The script runs on all public functions/methods when called without parameters, but it can run on private functions if you pass it as parameter (e.g. We don't check type annotations at the moment, but I guess shouldn't be difficult to implement it. The script now lives in numpydoc, I'm already working on replacing our version by the one in numpydoc. |
@WillAyd @mroeschke this is pretty spread out. LMK if there are pieces I can split out that you'd be comfortable merging. |
@@ -1677,6 +1676,7 @@ cpdef bint is_datetime64_array(ndarray values): | |||
return validator.validate(values) | |||
|
|||
|
|||
# TODO: only non-here use is in test |
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.
If so, I'm okay with removing in this PR.
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.
Poor wording on my part. This function is used inside lib.pyx, but its only non-cython use in in tests. So the option is to make it cdef
instead of cpdef
at the cost of not testing it directly.
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.
Ah okay. Thanks for clarifying that.
@@ -1720,6 +1720,7 @@ cdef class AnyTimedeltaValidator(TimedeltaValidator): | |||
return is_timedelta(value) | |||
|
|||
|
|||
# TODO: only non-here use is in test |
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.
Same
@@ -604,10 +603,6 @@ def srcpath(name=None, suffix=".pyx", subdir="src"): | |||
"_libs.ops": {"pyxfile": "_libs/ops"}, | |||
"_libs.properties": {"pyxfile": "_libs/properties", "include": []}, | |||
"_libs.reshape": {"pyxfile": "_libs/reshape", "depends": []}, | |||
"_libs.skiplist": { | |||
"pyxfile": "_libs/skiplist", |
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.
delete skiplist.h?
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.
still needed
@@ -379,28 +379,34 @@ ctypedef fused algos_t: | |||
uint8_t | |||
|
|||
|
|||
def _validate_limit(nobs: int, limit=None) -> int: | |||
if limit is None: |
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.
can you add a doc-string
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.
yes, next pass
looks fine, happy to merge now and follow up with those 2 issues or repush, lmk. |
thanks @jbrockmendel |
* follow-up to pandas-dev#29314 * followup to pandas-dev#28289
* follow-up to pandas-dev#29314 * followup to pandas-dev#28289
* follow-up to pandas-dev#29314 * followup to pandas-dev#28289
No description provided.