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

Refactor to enhance code quality #19

Open
thatvideoshopguy opened this issue Apr 12, 2023 · 4 comments
Open

Refactor to enhance code quality #19

thatvideoshopguy opened this issue Apr 12, 2023 · 4 comments
Assignees

Comments

@thatvideoshopguy
Copy link
Contributor

Description

Addressing multiple concerns, such as consistent naming conventions, splitting long functions, adding type hints, improving variable names, breaking down large functions, proper code formatting, and using f-strings can greatly enhance the code quality.

Example Improvements

In the extract() function, rename spattern and tpattern to source_pattern and target_pattern for better readability. We could refactor the convert() function to separate the handling of part matches into a dedicated function.

Could I be assigned to this issue to tackle these improvements comprehensively?

@B-R-P
Copy link
Collaborator

B-R-P commented May 5, 2023

Did you fully understand the codebase?

@thatvideoshopguy
Copy link
Contributor Author

Hi @B-R-P, thanks for the response. I probably don't understand the codebase as in-depth as yourself and the other contributors. What I was really getting at with this issue is suggesting that a modular approach to the functions and classes in separate files would make it easier to maintain and contribute too. Or did you want to keep a single LangTrans.py file?

@B-R-P
Copy link
Collaborator

B-R-P commented May 8, 2023

I want it as a single file for now. I am assigning you (@thatvideoshopguy) to improve the code, as you mentioned above.

@B-R-P
Copy link
Collaborator

B-R-P commented May 8, 2023

Use docs to better understand the code and feel free to ask me if you have any questions.

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

No branches or pull requests

2 participants