oremanj / greenback

Reenter an asyncio or Trio event loop from synchronous code
https://greenback.readthedocs.io/
Other
77 stars 2 forks source link

Fix has_portal() #13

Closed oremanj closed 2 years ago

oremanj commented 2 years ago

has_portal() now returns False instead of raising an error if called outside async context (fixes #12) and respects the given task argument.

codecov[bot] commented 2 years ago

Codecov Report

Merging #13 (725ae88) into master (9a9b662) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #13   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          697       705    +8     
  Branches        92       109   +17     
=========================================
+ Hits           697       705    +8     
Flag Coverage Δ
cpython 98.86% <100.00%> (+0.01%) :arrow_up:
pypy36release 93.81% <100.00%> (+0.21%) :arrow_up:

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

Impacted Files Coverage Δ
greenback/_impl.py 100.00% <100.00%> (ø)
greenback/_tests/test_impl.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 9a9b662...725ae88. Read the comment docs.