-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Linebreak is bleeding into the documentation page #27708
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
https://pandas.pydata.org/pandas-docs/stable/reference/series.html <tr class="row-even"><td><a class="reference internal" href="api/pandas.Series.T.html#pandas.Series.T" title="pandas.Series.T"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.T</span></code></a></td> <td>Return the transpose, which is by</td> </tr> And looks weird on https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.T.html#pandas.Series.T
I think need to add an explicit continuation and maybe decent to fix while passing code checks |
@WillAyd I don't get the explicit continuation The linter failures are not informative (exit 1) My line is 74 characters long and the file has longer lines. |
Sorry meant escape the line break. On phone so didn’t see exact check failure - do you need help with message? |
Looks like you need to run black against the module |
Anyone know why we need the newlines to begin with? |
If I had to guess just matches our standard of def func():
"""
Docstring goes here.
""" Instead of having that all on one line. |
Good guess. This diff from master seems to pass the docstring checks diff --git a/pandas/core/base.py b/pandas/core/base.py
index cfa8d2521..38a8bf717 100644
--- a/pandas/core/base.py
+++ b/pandas/core/base.py
@@ -687,8 +687,9 @@ class IndexOpsMixin:
T = property(
transpose,
- doc="""\nReturn the transpose, which is by
- definition self.\n""",
+ doc="""
+ Return the transpose, which is by definition self.
+ """,
)
@property @clemens-tolboom do you want to try that? |
As suggested by @TomAugspurger
@TomAugspurger your suggestion is way better :-) Done |
Looks good! Just as one last check can you see how this renders? We might need to wrap the string in dedent with this approach |
It looked fine to me locally. |
Thanks! |
* Linebreak is bleeding into the documentation page https://pandas.pydata.org/pandas-docs/stable/reference/series.html <tr class="row-even"><td><a class="reference internal" href="api/pandas.Series.T.html#pandas.Series.T" title="pandas.Series.T"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.T</span></code></a></td> <td>Return the transpose, which is by</td> </tr> And looks weird on https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.T.html#pandas.Series.T * Make \n real new line As suggested by @TomAugspurger
https://pandas.pydata.org/pandas-docs/stable/reference/series.html
And looks weird on https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.T.html#pandas.Series.T
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff