tilde-lab / metis-client

Metis infrastructure API client in Python
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

fix(MetisAPI): ability to run sync API in async runtime #54

Closed knopki closed 6 months ago

knopki commented 6 months ago

Closes #46 Detect running event loop. If running loop is present, then run coroutine in a blocking thread. Also, throw a warning about API misuse. asgiref dependency is thrown away.

pep8speaks commented 6 months ago

Hello @knopki! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 75:80: E501 line too long (81 > 79 characters) Line 82:80: E501 line too long (88 > 79 characters)

Line 49:80: E501 line too long (80 > 79 characters) Line 62:80: E501 line too long (88 > 79 characters)

Comment last updated at 2024-05-15 12:40:10 UTC
blokhin commented 6 months ago

@knopki what I really like is that we don't need any special keyword e.g. async=False the detection is fully automatic :+1::+1::+1: