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): remove invalid lines when parsing notebooks #656

Conversation

mkniewallner
Copy link
Collaborator

@mkniewallner mkniewallner commented Apr 1, 2024

Resolves #653.

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

Avoid parsing magics in notebooks, as they are not valid Python but notebook-specifics. Also fixes an issue with continuation characters that comes from the fact that we don't strip \n suffixes in notebook source code, which also caused the location reporters to show the wrong line location.

Copy link

codecov bot commented Apr 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.8%. Comparing base (5494d09) to head (ef7f1c9).

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #656   +/-   ##
=====================================
  Coverage   91.8%   91.8%           
=====================================
  Files         34      34           
  Lines        947     947           
  Branches     197     197           
=====================================
  Hits         870     870           
  Misses        60      60           
  Partials      17      17           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mkniewallner mkniewallner marked this pull request as ready for review April 1, 2024 23:49
@mkniewallner mkniewallner force-pushed the fix/remove-invalid-lines-when-parsing-notebooks branch from 348d220 to ef7f1c9 Compare April 2, 2024 07:01
@mkniewallner mkniewallner enabled auto-merge (squash) April 2, 2024 07:01
@mkniewallner mkniewallner merged commit a40f47b into fpgmaas:main Apr 2, 2024
29 checks passed
@mkniewallner mkniewallner deleted the fix/remove-invalid-lines-when-parsing-notebooks branch April 2, 2024 07:28
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.

Deptry fails to parse jupyter notebooks with special syntax and line continuation characters
2 participants