-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CI: add pydocstyle to code_checks #32033
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
Changes from 6 commits
979dcca
b6bd7a5
719e602
48ef670
39242d2
9fea852
89baa1c
ed4b764
fe25c6b
95a72bd
e3ca7f7
b269a0a
3de53d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -559,7 +559,6 @@ def __iter__(self): | |
------ | ||
tstamp : Timestamp | ||
""" | ||
|
||
# convert in chunks of 10k for efficiency | ||
data = self.asi8 | ||
length = len(self) | ||
|
@@ -820,7 +819,9 @@ def tz_convert(self, tz): | |
dtype = tz_to_dtype(tz) | ||
return self._simple_new(self.asi8, dtype=dtype, freq=self.freq) | ||
|
||
def tz_localize(self, tz, ambiguous="raise", nonexistent="raise"): | ||
# TODO: remove # noqa once https://github.com/PyCQA/pydocstyle/pull/441 | ||
# is merged | ||
def tz_localize(self, tz, ambiguous="raise", nonexistent="raise"): # noqa | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is the noqa needed here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. another continuation line issue. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we rather figure out what is wrong, or disable the indentation check? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably need a fix upstream There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks like an issue has already been raised for this PyCQA/pydocstyle#437 |
||
""" | ||
Localize tz-naive Datetime Array/Index to tz-aware | ||
Datetime Array/Index. | ||
|
@@ -1640,7 +1641,6 @@ def to_julian_date(self): | |
0 Julian date is noon January 1, 4713 BC. | ||
https://en.wikipedia.org/wiki/Julian_day | ||
""" | ||
|
||
# http://mysite.verizon.net/aesir_research/date/jdalg2.htm | ||
year = np.asarray(self.year) | ||
month = np.asarray(self.month) | ||
|
@@ -1705,7 +1705,6 @@ def sequence_to_dt64ns( | |
------ | ||
TypeError : PeriodDType data is passed | ||
""" | ||
|
||
inferred_freq = None | ||
|
||
dtype = _validate_dt64_dtype(dtype) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -538,7 +538,7 @@ def to_datetime( | |
infer_datetime_format=False, | ||
origin="unix", | ||
cache=True, | ||
): | ||
): # noqa: D207 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same question here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there looks to be a problem with the use of continuation. The next line is flagged as underindented (D207). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's black that requires this, so I would maybe not include the D207 check then, if it gives conflicts with black. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. disabling D207 on one or two functions is better than disabling on all, surely? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
""" | ||
Convert argument to datetime. | ||
|
||
|
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.
Would it make sense to have the codes in
setup.cfg
? I guess we could then callpydocstyle pandas
locally and get this validation.