JaidedAI / EasyOCR

Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.
https://www.jaided.ai
Apache License 2.0
23.96k stars 3.13k forks source link

Easyocr not PEP compliant. #823

Open ystoll opened 2 years ago

ystoll commented 2 years ago

Hi @rkcosmos, Thank you very much for a package very useful when one needs to perform ocr tasks. However, I have noticed that the code seems to be severely PEP un-complient (lots of variables do not stick to snake_case style, strings statements are there where one should replace them with commentaries, unused variables are left in the code etc...) I will use your code for a subsequent project and, to start with a good basis, I am currently working, with the help of Pylint, on a refactoring of the code to fix its style. I think that it will greatly improve the readability of the code. Would you be interested in me opening a PR when I will be done ?

ystoll commented 2 years ago

Please, anyone would be interested to refactor the core and complete it with proper docstrings ?

rkcosmos commented 2 years ago

Thanks for the suggestion. I would be interested in improving the readability. The chance of accepting PR would be higher if you separate it into several PRs, each fixing one issue. In general, the PR about typo, deleting unused variable, or adding comment will be accepted easily. I will be much more cautious when it comes to variable name changing because it can cause the problem with other parts of the code. So, it should be fine as long as you avoid breaking change.