-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Improved handling of PPM header #5121
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
6b81e34
Improve handling of PPM headers
Piolie 699afe1
Improve PPM tests
Piolie d2ad27d
Correctly check magic number
Piolie 4dbe244
Add token limit
Piolie 5d0ad5e
Revert exception types to `ValueError`
Piolie 002e0bd
Add tests for token size and wrong magic number
Piolie 73fed77
Suppress exception context
Piolie bc5ecfb
Make minor changes to tests
Piolie 50522d9
Change max token size to 10
Piolie 39288f0
Create `maxval` variable
Piolie b43654d
Change variable name in `_read_magic()`
Piolie b6f6fba
Rewrite `_ignore_comment` as one-liner
Piolie 41a439d
Added context managers
radarhere 8ad5172
Fix wrong extension in temp test files
Piolie 9c2cbcf
Keep case consistency in error messages
Piolie e2e87d7
Reverted SyntaxError change to match other plugins
radarhere cb4e267
Retain variable case for backwards compatibility
radarhere 3426052
Removed re-raising of exception
radarhere f5b9e2c
Explicitly check if magic number is empty
radarhere 65edcc4
Merge branch 'main' into PPMheaders
radarhere d968301
Updated tests
radarhere 4f8173f
Refactored to reduce risk of infinite loop
radarhere f7504b1
Changed variable
radarhere File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.