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 errors after processing AST #619

Merged

Conversation

mkniewallner
Copy link
Collaborator

@mkniewallner mkniewallner commented Mar 18, 2024

Resolves #618.

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

It looks like using the logger during parallel processing blocks the process. So this PR delegates logging to get_imports_from_py_files, after the parallel processing.

Test plan

Unit tests and local testing with a directory that contains a file with a syntax error, and a file that is correct. Without the change, for both, the process hangs.

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.7%. Comparing base (a85339e) to head (0287201).

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #619   +/-   ##
=====================================
  Coverage   90.7%   90.7%           
=====================================
  Files         38      38           
  Lines       1086    1086           
  Branches     224     224           
=====================================
  Hits         986     986           
  Misses        85      85           
  Partials      15      15           

☔ 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 March 18, 2024 12:58
@mkniewallner mkniewallner requested a review from fpgmaas March 18, 2024 12:58
@mkniewallner mkniewallner merged commit 673371c into fpgmaas:main Mar 18, 2024
29 checks passed
@mkniewallner mkniewallner deleted the fix/handle-errors-after-ast-processing branch March 24, 2024 10:56
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 hangs
2 participants