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

fix(imports): handle SyntaxError #426

Merged
merged 1 commit into from
Jun 18, 2023

Conversation

mkniewallner
Copy link
Collaborator

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Description of changes

Since python/cpython#97594, ast.parse can now raise SyntaxError while it would previously raise ValueError. This change was backported to 3.11.4, breaking our current test suite on Windows for Python 3.11.

Also removing UnicodeDecodeError, because it's a subclass of UnicodeError, which is a subclass of ValueError, so it is redundant.

@codecov
Copy link

codecov bot commented Jun 18, 2023

Codecov Report

Merging #426 (d128261) into main (743b22f) will not change coverage.
The diff coverage is 100.0%.

@@          Coverage Diff          @@
##            main    #426   +/-   ##
=====================================
  Coverage   96.1%   96.1%           
=====================================
  Files         37      37           
  Lines       1070    1070           
  Branches     215     215           
=====================================
  Hits        1029    1029           
  Misses        25      25           
  Partials      16      16           
Impacted Files Coverage Δ
...ry/imports/extractors/notebook_import_extractor.py 87.8% <100.0%> (ø)
...ptry/imports/extractors/python_import_extractor.py 100.0% <100.0%> (ø)

@mkniewallner mkniewallner marked this pull request as ready for review June 18, 2023 00:20
@fpgmaas fpgmaas merged commit 11aabee into fpgmaas:main Jun 18, 2023
@mkniewallner mkniewallner deleted the fix/handle-syntax-error branch June 18, 2023 10:06
@mkniewallner mkniewallner mentioned this pull request Jun 18, 2023
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.

2 participants