-
Notifications
You must be signed in to change notification settings - Fork 3k
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
General code cleanup for Interactive, resolve pylint, some fixes #5745
Conversation
View a preview at https://prompt.ws/r/Azure/azure-cli/5745 |
columns = right - left + 1 | ||
lines = bottom - top + 1 | ||
return lines, columns | ||
windll.kernel32.GetConsoleScreenBufferInfo(h, csbi) |
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.
Why have you removed the if condition here?
def __init__(self): | ||
self.command_table = None | ||
self.shell_ctx = None | ||
command_table = None |
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.
Why is this a class variable rather than an instance variable like it was before?
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.
We were using a global variable to keep an instance of the table as a singleton.
Keeping the table in a class as a variable accomplishes the same and seems to be preferable in python.
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.
It's hard to tell what's changed and what's just moved. As you yourself have pointed out, the interactive tests aren't great at preventing regressions, so hopefully you have thoroughly tested interactive manually with your changes. If not, you might defer this to the next release, especially if its mostly refactoring. But if you are happy with it, so am I.
-moved azclishell code to command_module/interactive folder
-command_table loading more robust to exceptions
Fixes: #5688
-fixed broken
--progress
param for long running operations-lots of code cleanup
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
(see Authoring Command Modules)