-
Notifications
You must be signed in to change notification settings - Fork 234
Refactor #197
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
Refactor #197
Conversation
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.
TODO: Make these loops terminate early?
|
There is one catch that the |
|
We seem to be inconsistent on the file naming. Some have capitals in them (e.g. "TypeScript.py"), some have underscores (e.g. "go_to_type.py" or "quick_info.py"), and some don't (e.g. "jsonhelpers.py" or "eventhub.py"). It would be good to make this consistent while doing all the work to move files around now. Personally, I like all lower case with underscores, e.g. "quick_info.py", which aligns with the PEP8 guidance. (p.s. "auto_indent_on_enter_between_curly_braces.py" is probably a little long. Can we shorten this?) Also, why did we make 'commands' and 'listeners' top level packages also, rather than residing within one top level package (e.g. 'libs')? |
|
I agree that all lower case with underscore file names would make more sense. |
|
It's not a big deal about the top-level thing, so we can leave it as is for now. If everything was surfaced in the top-level package it would allow you to just have "from libs import *" in the typescript.py, but again, as-is currently is fine. |
commands/__init__.py
Outdated
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.
Several of these lines go way beyond the 79 char width recommended in PEP8. You can use parens to group imports and not need the line continuation character. For example, the above might look better as:
from .format import (
TypescriptFormatBrackets,
TypescriptFormatDocument,
TypescriptFormatLine,
TypescriptFormatOnKey,
TypescriptFormatSelection,
TypescriptPasteAndFormat)|
FYI: you broke a few things by renaming |
|
@ddotlic Oops I just noticed as well. Will correct in a minute. Thanks for the heads up! |
Refactor the overall structure of the codebase.