Skip to content
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 the refactoring #10

Merged
merged 8 commits into from
May 23, 2018

Conversation

mircealungu
Copy link
Member

@joelgrondman -- i've used the PyCharm 'refactoring' tool to move several files in their own modules, and split a bigger file in two smaller ones. This makes the code less daunting since there's a bit more structure in the file organization.

Some tests are failing on my machine, but they seem to be failing also on your branch. Can you look into that?

@mircealungu mircealungu requested a review from joelgrondman May 23, 2018 09:48
from datetime import datetime

from python_translators.translators.glosbe_translator import Translator
from python_translators.translators.glosbe_over_tor_translator import GlosbeOverTorTranslator
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joelgrondman - note that many of these removed imports are done automatically by Python when refactoring code since they are not used in the corresponding file.

For SQLAlchemy I have had in the past code which requires a class to be loaded, even if it's not used straight away in that file. I hope this is not the case anywhere here!

return path_to_cognate_file(primary, secundary, CANDIDATES, method_name)


def path_of_cognate_blacklist(primary, secundary, author:str = ""):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that many of these changes are also PyCharm reformatting code after a refactoring.

@joelgrondman
Copy link

Some of the imports we're not correctly handled with pycharm. I've adjusted them and the tests which all pass now.

@joelgrondman joelgrondman merged commit 7ce271b into towards_refactoring_the_api May 23, 2018
@joelgrondman joelgrondman deleted the refactoring_the_refactoring branch May 23, 2018 19:17
@mircealungu
Copy link
Member Author

Thanks for fixing the imports.
Maybe put a comment near those that are critical, saying that they should not be removed.
Otherwise, there's the risk that at some future refactoring

@mircealungu
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants