Skip to content
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

DOC: Validate space before colon in the parameters section of the docstrings #23483

Closed
datapythonista opened this issue Nov 4, 2018 · 0 comments · Fixed by #23506
Closed
Labels
Code Style Code style, linting, code_checks Docs good first issue
Milestone

Comments

@datapythonista
Copy link
Member

In the docstrings, parameters are documented like this:

Parameters
----------
name : str
    The name of the person.

It is common that the space before the colon is not present, and in that case validate_docstrings.py reports:

  • Parameter "name: str" has no type

Which is confusing, and new contributors may have problems understanding what the problem is. We should validate this specific problem, and report an appropriate error message like A space is required before the colon separating the parameter name and type.

This needs to be tested (in scripts/tests/test_validate_docstrings.py).

@jreback jreback added this to the 0.24.0 milestone Nov 6, 2018
thoo added a commit to thoo/pandas that referenced this issue Nov 15, 2018
* upstream/master:
  BUG: to_html misses truncation indicators (...) when index=False (pandas-dev#22786)
  API/DEPR: replace "raise_conflict" with "errors" for df.update (pandas-dev#23657)
  BUG: Append DataFrame to Series with dateutil timezone (pandas-dev#23685)
  CLN/CI: Catch that stderr-warning! (pandas-dev#23706)
  ENH: Allow for join between two multi-index dataframe instances (pandas-dev#20356)
  Ensure Index._data is an ndarray (pandas-dev#23628)
  DOC: flake8-per-pr for windows users (pandas-dev#23707)
  DOC: Handle exceptions when computing contributors. (pandas-dev#23714)
  DOC: Validate space before colon docstring parameters pandas-dev#23483 (pandas-dev#23506)
  BUG-22984 Fix truncation of DataFrame representations (pandas-dev#22987)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks Docs good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants