Skip to content

Issue 1344 - fix three leading underscores issue in _check_method_and_attr_name#1353

Open
rachelzUT wants to merge 4 commits into
pyta-uoft:masterfrom
rachelzUT:issue-1344
Open

Issue 1344 - fix three leading underscores issue in _check_method_and_attr_name#1353
rachelzUT wants to merge 4 commits into
pyta-uoft:masterfrom
rachelzUT:issue-1344

Conversation

@rachelzUT
Copy link
Copy Markdown
Contributor

@rachelzUT rachelzUT commented Jun 3, 2026

Proposed Changes

Closes #1344

Modifies InvalidNameChecker to allow all name patterns to have up to 2 leading underscores, so _check_method_and_attr_name no longer separately checks for double leading underscores. Suggested name fixes are also changed to suggest two leading underscores if prefixes are longer than 2 characters.

Also modified _to_snake_case to use_parse_name to be consistent with _to_pascal_case and _to_upper_case_with_underscores.

...

Screenshots of your changes (if applicable)

Type of Change

Type Applies?
🚨 Breaking change (fix or feature that would cause existing functionality to change)
New feature (non-breaking change that adds functionality)
🐛 Bug fix (non-breaking change that fixes an issue) X
♻️ Refactoring (internal change to codebase, without changing functionality)
🚦 Test update (change that only adds or modifies tests)
📚 Documentation update (change that only updates documentation)
📦 Dependency update (change that updates a dependency)
🔧 Internal (change that only affects developers or continuous integration)

Checklist

Before opening your pull request:

  • I have performed a self-review of my changes.
    • Check that all changed files included in this pull request are intentional changes.
    • Check that all changes are relevant to the purpose of this pull request, as described above.
  • I have added tests for my changes, if applicable.
    • This is required for all bug fixes and new features.
  • I have updated the project documentation, if applicable.
    • This is required for new features.
  • I have updated the project Changelog (this is required for all changes).
  • If this is my first contribution, I have added myself to the list of contributors.

After opening your pull request:

  • I have verified that the CI tests have passed.
  • I have reviewed the test coverage changes reported by Coveralls.
  • I have requested a review from a project maintainer.

Questions and Comments

Additionally made a few modifications to some function docstrings to reflect these (and other recent) changes.

@coveralls
Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 26858357806

Coverage increased (+0.004%) to 90.699%

Details

  • Coverage increased (+0.004%) from the base build.
  • Patch coverage: 9 of 9 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 3946
Covered Lines: 3579
Line Coverage: 90.7%
Coverage Strength: 17.61 hits per line

💛 - Coveralls

@rachelzUT rachelzUT requested a review from david-yz-liu June 3, 2026 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_check_method_and_attr_name in invalid name checker allows names with three leading underscores

2 participants