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

enhancement: add _clean_ocr_languages_arg helper function #2413

Merged
merged 14 commits into from
Jan 19, 2024

Conversation

Coniferish
Copy link
Collaborator

This PR is one in a series of PRs for refactoring and fixing the languages parameter so it can address incorrect input by users. #2293

This PR adds _clean_ocr_languages_arg. There are no calls to this function yet, but it will be called in later PRs related to this series.

@shreyanid
Copy link
Contributor

I know you mentioned this will be used in future PR, but could you give me an idea of where this will be used? Why does this change only impact to the (soon deprecated) ocr_languages arg and not languages as well?

Copy link
Contributor

@shreyanid shreyanid left a comment

Choose a reason for hiding this comment

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

for whatever use ocr_languages still has, this change LGTM. let me know if you can give more context (see earlier question) so I can merge

@Coniferish
Copy link
Collaborator Author

Coniferish commented Jan 18, 2024

@shreyanid This is all stemming from users passing in incorrect arguments to the API. The issue that was opened is about accepting those common mistakes (even though ocr_languages will be deprecated). I don't know when we're planning to officially deprecate ocr_languages.

@shreyanid
Copy link
Contributor

ok, just revisited the linked issue. I also am not sure when we plan to officially deprecate it. I suppose handling messy ocr_languages is helpful anyway so that it becomes compatible with our conversion from ocr_languages to languages (if languages is not specified). sgtm thanks!

@shreyanid shreyanid added this pull request to the merge queue Jan 18, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 18, 2024
@shreyanid shreyanid added this pull request to the merge queue Jan 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Jan 19, 2024
@shreyanid shreyanid added this pull request to the merge queue Jan 19, 2024
Merged via the queue into main with commit c34fac9 Jan 19, 2024
43 checks passed
@shreyanid shreyanid deleted the jj/add_lang_helper_func branch January 19, 2024 20:42
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.

None yet

2 participants