Skip to content

thing_or_things: skip self/cls only on methods - #33

Merged
dpep merged 1 commit into
mainfrom
tot-self-methods-only
Oct 27, 2026
Merged

dpep merged 1 commit into
mainfrom
tot-self-methods-only

Conversation

@dpep

@dpep dpep commented Oct 27, 2026

Copy link
Copy Markdown
Owner

#29 skipped any parameter named self or cls, including on plain functions. So def css(cls, prefix="x-") treated prefix as the thing and broke. 0.5.1 returned 'x-btn' there.

It now skips only the first parameter, and only on methods, meaning functions whose __qualname__ puts them in a class body.

Tests: test_self_param_on_function. test_methods still covers the method case.

@dpep
dpep marked this pull request as ready for review October 27, 2026 03:58
@dpep
dpep merged commit bdd6386 into main Oct 27, 2026
6 checks passed
@dpep
dpep deleted the tot-self-methods-only branch October 27, 2026 03:58
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.

1 participant