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

MAINT Fix lint, clean and expand docstrings #1169

Merged
merged 27 commits into from
Aug 18, 2023

Conversation

lucyleeow
Copy link
Contributor

@lucyleeow lucyleeow commented Aug 17, 2023

Addresses some docstring lint rules previously ignored.

  • Ignore "D103" (Missing docstring in public function) for tests - there were many tests without docstrings and it did not seem necessary to add these.
  • This PR should only include docstring changes - other changes will be in other PRs

Turned out to be larger than I initially expected. If you're wanting to take a look @larsoner, would be useful to just look at any 'parameter' additions to make sure they are correct.

Copy link
Contributor

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome @lucyleeow , I was not happy adding all those ignores -- it'll be nice to have them gone!

@larsoner larsoner enabled auto-merge (squash) August 17, 2023 17:08
0: /home/sample-proj/source/plot_types/images/img1.png,
2.0: /home/sample-proj/source/plot_types/images/img1_2_00x.png,
The result will be:

The result wwould be:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The result wwould be:
The result would be:

Also there are spelling failures in CIs

Regex to find references to python objects.
example_globals: Optional[Dict[str, Any]]
Global variables for examples. Default=None
node : ast.Module or str
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using default 'exec' I think the output is ast.Module:
https://greentreesnakes.readthedocs.io/en/latest/tofrom.html#getting-to-and-from-asts

@larsoner larsoner merged commit 451ccba into sphinx-gallery:master Aug 18, 2023
@lucyleeow
Copy link
Contributor Author

Thanks! I did not expect CIs to be green already!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants