You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: When using a Class for grouping commands --self shows as a flag #382
I'd like to fix this. I reproduced it on master: completion._Commands(Foo) yields ('bar', '--self') and ('do-stuff', '--self'), because accessing an instance method on the class gives a plain function and its first argument is treated as a flag. My plan is to skip the first argument of instance methods (not static or class methods) when generating completions, with a test. I'll open a PR shortly.
Disclosure: I use an AI coding assistant for parts of my contributions, and I check the change myself.
Activity
suryakant-source commentedon Oct 15, 2026
I'd like to fix this. I reproduced it on master:
completion._Commands(Foo)yields('bar', '--self')and('do-stuff', '--self'), because accessing an instance method on the class gives a plain function and its first argument is treated as a flag. My plan is to skip the first argument of instance methods (not static or class methods) when generating completions, with a test. I'll open a PR shortly.Disclosure: I use an AI coding assistant for parts of my contributions, and I check the change myself.