Skip to content

fix(imports): handle SyntaxError#426

Merged
fpgmaas merged 1 commit intofpgmaas:mainfrom
mkniewallner:fix/handle-syntax-error
Jun 18, 2023
Merged

fix(imports): handle SyntaxError#426
fpgmaas merged 1 commit intofpgmaas:mainfrom
mkniewallner:fix/handle-syntax-error

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
@mkniewallner mkniewallner requested a review from fpgmaas 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