-
- Notifications
You must be signed in to change notification settings - Fork 19.2k
PR04 errors fix #25157
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
PR04 errors fix #25157
Changes from 6 commits
0dc07f2 b93e438 ae369ec 3ac2383 7651a63 93654b9 ce46f24 e9fdd08 63aaaf0 0447294 aeed6ab 9308491 4bb3b0b f95c4b5 619253c 8113c21 bffd111 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 |
|---|---|---|
| | @@ -648,13 +648,14 @@ def transpose(self, *args, **kwargs): | |
| copy : boolean, default False | ||
| Make a copy of the underlying data. Mixed-dtype data will | ||
| always result in a copy | ||
| kwargs : Additional keyword arguments will be passed to the function | ||
| ||
| | ||
| Returns | ||
| ------- | ||
| ---------- | ||
| ||
| y : same as input | ||
| | ||
| Examples | ||
| -------- | ||
| ---------- | ||
| >>> p.transpose(2, 0, 1) | ||
| >>> p.transpose(2, 0, 1, copy=True) | ||
| """ | ||
| | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| | @@ -55,18 +55,23 @@ class Grouper(object): | |||||
| sort : boolean, default to False | ||||||
| whether to sort the resulting labels | ||||||
| | ||||||
| additional kwargs to control time-like groupers (when `freq` is passed) | ||||||
| | ||||||
| closed : closed end of interval; 'left' or 'right' | ||||||
| label : interval boundary to use for labeling; 'left' or 'right' | ||||||
| convention : {'start', 'end', 'e', 's'} | ||||||
| If grouper is PeriodIndex | ||||||
| base, loffset | ||||||
| base : int, default 0 | ||||||
| loffset : string / DateOffset / timedelta object | ||||||
| ||||||
| loffset : string / DateOffset / timedelta object | |
| loffset : string, DateOffset, or timedelta |
Outdated
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.
What does this have to do with the PR04 error? Changes should really be limited to one thing at a time
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.
Line
additional kwargs to control time-like groupers (when
freqis passed)
was treated as parameter, so I had to move it somewhere else.
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.
Kwargs is a parameter so it belongs there
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.
Get rid of this section and just document kwargs as a parameter like everywhere else
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -42,7 +42,7 @@ | |
| axes_single_arg="{0, 1, 2, 'items', 'major_axis', 'minor_axis'}", | ||
| optional_mapper='', optional_axis='', optional_labels='') | ||
| _shared_doc_kwargs['args_transpose'] = ( | ||
| "three positional arguments: each one of\n{ax_single}".format( | ||
| "{ax_single}\n\tthree positional arguments from given options".format( | ||
| ||
| ax_single=_shared_doc_kwargs['axes_single_arg'])) | ||
| | ||
| | ||
| | @@ -1008,7 +1008,7 @@ def apply(self, func, axis='major', **kwargs): | |
| DataFrames of items & major axis will be passed | ||
| axis : {'items', 'minor', 'major'}, or {0, 1, 2}, or a tuple with two | ||
| axes | ||
| Additional keyword arguments will be passed as keywords to the function | ||
| kwargs : Additional keyword arguments will be passed to the function | ||
| ||
| | ||
| Returns | ||
| ------- | ||
| | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -795,7 +795,7 @@ def std(self, ddof=1, *args, **kwargs): | |
| Parameters | ||
| ---------- | ||
| ddof : integer, default 1 | ||
| degrees of freedom | ||
| degrees of freedom | ||
| ||
| """ | ||
| nv.validate_resampler_func('std', args, kwargs) | ||
| return self._downsample('std', ddof=ddof) | ||
| | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -424,9 +424,10 @@ def render(self, **kwargs): | |
| | ||
| Parameters | ||
| ---------- | ||
| `**kwargs` : Any additional keyword arguments are passed through | ||
| to ``self.template.render``. This is useful when you need to provide | ||
| additional variables for a custom template. | ||
| kwargs : Any additional keyword arguments | ||
| ||
| keywords are passed throught o ``self.template.render``. | ||
| This is useful when you need to provide | ||
| additional variables for a custom template. | ||
| | ||
| .. versionadded:: 0.20 | ||
| | ||
| | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -271,7 +271,7 @@ def read_parquet(path, engine='auto', columns=None, **kwargs): | |
| ``io.parquet.engine`` is used. The default ``io.parquet.engine`` | ||
| behavior is to try 'pyarrow', falling back to 'fastparquet' if | ||
| 'pyarrow' is unavailable. | ||
| kwargs are passed to the engine | ||
| kwargs : Any additional kwargs are passed to the engine | ||
| ||
| | ||
| Returns | ||
| ------- | ||
| | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -543,7 +543,7 @@ def validate_pep8(self): | |
| application = flake8.main.application.Application() | ||
| application.initialize(["--quiet"]) | ||
| | ||
| with tempfile.NamedTemporaryFile(mode='w') as file: | ||
| with tempfile.NamedTemporaryFile(mode='w', encoding="utf-8") as file: | ||
| ||
| file.write(content) | ||
| file.flush() | ||
| application.run_checks([file.name]) | ||
| | ||
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 pass LINTing? May or may not be an issue just not aware of combining parameters like this into one line anywhere else
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.
Checked, there is one (only line to long atm), but I have no idea how to properly refactor that doc so PR04 error won't appear again
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.
Hmm OK. Technically the signature for this class only accepts **kwargs, so I would use that as the type and then move everything about days, seconds, etc... down into the descption