Skip to content
Discussion options

You must be logged in to vote

It looks to me like a bug in PyCharm rather than httpx (but I'm not associated with the httpx project so that is just a random person's observation). In any case, as a workaround, you can always do

async with httpx.AsyncClient() as client:
    assert isinstance(client, httpx.AsyncClient)
    # your code here

which is picked up by PyCharm's type hinting. (In fact it used to be the main way to do type hinting in PyCharm before annotations were added to Python.)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Wouterkoorn
Comment options

@florimondmanca
Comment options

@Wouterkoorn
Comment options

Answer selected by Wouterkoorn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants