-
Notifications
You must be signed in to change notification settings - Fork 124
Refactoring #798
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
Refactoring #798
Conversation
This includes moving cmd2 decorators into a new file called decorators.py
Moved some constants from cmd2.py to constants.py
Codecov Report
@@ Coverage Diff @@
## master #798 +/- ##
==========================================
- Coverage 96.94% 96.91% -0.03%
==========================================
Files 14 15 +1
Lines 3499 3506 +7
==========================================
+ Hits 3392 3398 +6
- Misses 107 108 +1
Continue to review full report at Codecov.
|
tleonhardt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmd2.py is a huge file which predominantly contains the cmd2.Cmd class. I salute anything which moves other stuff out of there and shrinks it in size.
| return arg_decorator | ||
|
|
||
|
|
||
| class _SavedReadlineSettings: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are moving things out of cmd2.py, should we consider moving _SavedReadlineSettings to rl_utils.py and _SavedCmd2Env to utils.py?
| passed to commands: | ||
|
|
||
| .. automethod:: cmd2.cmd2.with_argument_list | ||
| .. automethod:: cmd2.decorators.with_argument_list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it should be autofunction instead of automethod here? Or should it be automethod in the api/decorators.rst file? Or does it just not matter?
Moving a bit of code around to shrink cmd2.py