Skip to content

Apply Sourcery suggestions and fix typos #3131

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Jun 12, 2025

  • Start applying Sourcery suggestions.
  • Fix typos.

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/user-guide/*.rst
  • Changes documented as a new file in changes/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@github-actions github-actions bot added the needs release notes Automatically applied to PRs which haven't added release notes label Jun 12, 2025
@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as draft June 12, 2025 22:14
@dstansby
Copy link
Contributor

I'm 👍 for spelling fixes, and 👎 for refactoring without a linter doing it automatically for us (because it just creates PR review noise for not much technical debt reduction). Could you open a PR to repalce this that just includes the spelling fixes?

@DimitriPapadopoulos
Copy link
Contributor Author

I think Sourcery applies linter rules, but rules that might not be part of ruff (yet). More importantly, I think Sourcery is a good addition - AI assistance for PR review. But I understand you don't agree with it.

Some of the Sourcery suggestions do improve source code, such as:

-    n_ellipsis = sum(1 for i in selection if i is Ellipsis)
+    n_ellipsis = selection.count(Ellipsis)

How about keeping the couple changes that really make sense?

@DimitriPapadopoulos DimitriPapadopoulos force-pushed the sourcery branch 2 times, most recently from 4ccbfb8 to 667a5d0 Compare June 20, 2025 12:51
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the sourcery branch 2 times, most recently from 2a9d078 to 2a36413 Compare June 20, 2025 13:18
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the sourcery branch 3 times, most recently from b117f26 to 58a1c91 Compare June 20, 2025 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs release notes Automatically applied to PRs which haven't added release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants