benthayer / git-gud

Wanna git gud? Then get git-gud, and git gud at git!
MIT License
401 stars 42 forks source link

Refactored subparsers #328

Closed benthayer closed 3 years ago

benthayer commented 3 years ago

The goal here is to make the parsers a whole lot easier to comprehend

benthayer commented 3 years ago

@sahansk2 I know you haven't touched this in a while, but I was feeling like the commands were getting unwieldy. Do you think you can take a look at this?

benthayer commented 3 years ago

I was thinking about doing a loop in __init__ to make the arguments automatically include the self variable, so you'd only have to call args.func(args) in GitGud.parse, but that seems like overkill and I'm not sure how to do it well