-
Notifications
You must be signed in to change notification settings - Fork 236
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 node code into nodeclient module #2
Conversation
if jsonObj["type"] == "response": | ||
msgq.put(jsonObj) | ||
else: | ||
print("event:") |
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.
Could we remove the print statement? and whoever need it will add the print themselve
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 will keep it for now and then remove it when the proxy raises an event which then we can add a print in the event handler.
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.
yep sound good.
VERY VERY minor stuff : python style uses underscore instead of camel case. I do not if we want to follow Python style guide closely. I just raise this now since we are moving things around |
Great to see some modularity. OK with me to remove all print statements. Was planning to go_to_snake_case. I figured out after I started with camel case that Sublime Text was normalizing to snake case and that python often uses that convention. Am wondering what would happen if we placed listener class in separate file (would somehow need to get at the singleton client instance). It's about half the code. |
self.t.daemon = True | ||
self.t.start() | ||
|
||
self.node = NodeClient(procFile) |
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.
Consider renaming this to nodeClient
to avoid association with AST nodes.
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.
fixed
I referred to this for coding guidelines: https://www.python.org/dev/peps/pep-0008/ I don’t see one recommended naming standard. They definitely use different naming standards in the Python library. I just would like us to stay consistent. Here is my preference:
I will look into the listener when I do my other proxy change. From: Steve Lucco [mailto:notifications@github.com] Great to see some modularity. OK with me to remove all print statements. Was planning to go_to_snake_case. I figured out after I started with camel case that Sublime Text was normalizing to snake case and that python often uses that convention. Am wondering what would happen if we placed listener class in separate file (would somehow need to get at the singleton client instance). It's about half the code. — |
@hinzo I see. I agree with you on consistency. I have no strong preference on naming standard so if that is what you prefer, I will be happy to adopted into the vim-client and use the similar style. |
Refactoring node code into nodeclient module
To clarify, there is a section for naming conventions:
Though I agree, I prefer camel casing. |
Camel ok with me. Note sublime will turn camel into snake in for example view.run_command. Also Sublime has conventions such as command classes end in 'command' but this is dropped in command name used for menus and run_command Sent from my Windows Phone From: Yuimailto:notifications@github.com @hinzohttps://github.com/hinzo I see. I agree with you on consistency. I have no strong preference on naming standard so if that is what you prefer, I will be happy to adopted into the vim-client and use the similar style. — |
add quick_info_full
@steveluc @yuit
This is part one: Only separate the node client out. Part two will add the proxy to make it easier to call the commands on the service.