Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

No completions for requests.Response type #564

Description

@qubitron

A case to test with the new analysis code:
image

requests.get shows it returns a requests.Response type:
image

Jedi:
image

Activity

  1. jakebailey commented on Feb 1, 2019

    @jakebailey
    Member

    With #546:

    image

  2. qubitron commented on Feb 2, 2019

    @qubitron
    Author

    Nice! We are picking up more completions, and have different icons for properties vs. functions (content is a property, close is a function).

    Curious why cookies/elapsed/encoding show as "ABC" vs. the orange icon shown in Jedi. I'm not sure what the icons mean exactly but we might need to double check we're using the right ones in the right places.

  3. jakebailey commented on Feb 2, 2019

    @jakebailey
    Member

    It's just a completion item kind choice which we'd change to match the old LS. In typeshed:

    class Response: # truncated
        encoding = ...  # type: str
        cookies = ...  # type: RequestsCookieJar
        elapsed = ...  # type: datetime.timedelta
        def iter_content(self, chunk_size: Optional[int] = ...,
                         decode_unicode: bool = ...) -> Iterator[Any]: ...
        def iter_lines(self, chunk_size=..., decode_unicode=..., delimiter=...): ...
        @property
        def content(self) -> bytes: ...
        @property
        def text(self) -> str: ...

    The wrench is the VSC icon for property.

  4. jakebailey commented on Feb 2, 2019

    @jakebailey
    Member

    Though this unfortunately shows that we need to parse out those type comments to fully support the requests hints.

  5. MikhailArkhipov commented on Feb 4, 2019

    @MikhailArkhipov

    #7 currently not GA but can be.

  6. qubitron commented on Feb 4, 2019

    @qubitron
    Author

    We may not need to block GA on the type hints, but should probably add support for them soon after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions