Skip to content

Fix a circular import error created by #197. #225

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 1 commit into from
Feb 23, 2022
Merged

Conversation

tobiasraabe
Copy link
Member

@tobiasraabe tobiasraabe commented Feb 23, 2022

Changes

Move the import of cli.py to the lowest position in pytask/__init__.py.

When cli is imported, plugins will be imported before other modules like pytask.mark have been imported. But, plugins will also try to import from pytask import Mark which will cause the circular import error.

I am not sure whether this is a permanent fix.

@tobiasraabe tobiasraabe added this to the v0.1.9 milestone Feb 23, 2022
@codecov
Copy link

codecov bot commented Feb 23, 2022

Codecov Report

Merging #225 (4ca64fc) into main (ae882f2) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #225   +/-   ##
=======================================
  Coverage   94.17%   94.17%           
=======================================
  Files          75       75           
  Lines        6713     6713           
=======================================
  Hits         6322     6322           
  Misses        391      391           
Flag Coverage Δ
end_to_end 79.78% <100.00%> (ø)
integration 41.85% <100.00%> (ø)
unit 70.40% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pytask/__init__.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae882f2...4ca64fc. Read the comment docs.

@tobiasraabe tobiasraabe merged commit e2812c2 into main Feb 23, 2022
@tobiasraabe tobiasraabe deleted the fix-circular-import branch February 23, 2022 18:20
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.

1 participant