Skip to content

MAINT Fix lint, clean and expand docstrings#1169

Merged
larsoner merged 27 commits intosphinx-gallery:masterfrom
lucyleeow:ruff
Aug 18, 2023
Merged

MAINT Fix lint, clean and expand docstrings#1169
larsoner merged 27 commits intosphinx-gallery:masterfrom
lucyleeow:ruff

Conversation

@lucyleeow
Copy link
Copy Markdown
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
Copy Markdown
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
2.0: /home/sample-proj/source/plot_types/images/img1_2_00x.png,
The result will be:

The result wwould be:
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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