-
Notifications
You must be signed in to change notification settings - Fork 477
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
Sync with fork #514
Merged
Merged
Sync with fork #514
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bumps [mypy](https://github.com/python/mypy) from 1.11.2 to 1.12.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](python/mypy@v1.11.2...v1.12.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Fixes N806 variable 'SCORE_VAL' in function should be lowercase
Bumps [setuptools](https://github.com/pypa/setuptools) from 75.1.0 to 75.2.0. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst) - [Commits](pypa/setuptools@v75.1.0...v75.2.0) --- updated-dependencies: - dependency-name: setuptools dependency-type: indirect update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Mypy settings/instructions
Improve python compatability
1. **Modular Functions**: The code is broken down into smaller functions (`_process_horizontal_cut`, `_process_vertical_cut`, and `_group_and_process_chars`) to handle specific tasks, making it easier to read and maintain. 2. **Error Handling**: The try-except block was removed since the logic handles cases gracefully without needing to catch exceptions. 3. **Type Hints**: Type hints were added for better code clarity and to help with type checking.
1. **Removed Unnecessary Checks**: The code now handles edge cases (when `point` is less than the first element or greater than the last element) upfront to simplify the binary search logic. 2. **Simplified Logic**: The binary search loop has been streamlined. The conditions for moving `left` and `right` have been clarified, focusing on the mid-point comparison without extra checks. 3. **Post-Loop Calculation**: After the binary search loop, we directly check the closest points by comparing the distances of the found indices to the `point`. This reduces redundancy and improves clarity. 4. **Type Annotations**: The docstring is improved to specify the types of parameters and return values, which enhances the understanding of this function. Overall, this refactored function maintains the original functionality while being more efficient and easier to understand.
Bumps [charset-normalizer](https://github.com/jawah/charset_normalizer) from 3.4.0 to 3.4.1. - [Release notes](https://github.com/jawah/charset_normalizer/releases) - [Changelog](https://github.com/jawah/charset_normalizer/blob/master/CHANGELOG.md) - [Commits](jawah/charset_normalizer@3.4.0...3.4.1) --- updated-dependencies: - dependency-name: charset-normalizer dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Closed
Need to cherry pick non dependabot commits so gonna create a new PR again EDIT: it's hard to cherry pick only human commits so I'll keep dependabot commits for now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.