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.

Handle simple if statements when processing stubs #569

@jakebailey

Description

@jakebailey

Typeshed's stubs contain many if statements to declare things based on the Python version and the system platform. In order to have the right type info, when analyzing stubs we should handle those checks. They're not complicated, and are usually like:

if sys.version_info >= (3, 6): ...
if sys.platform == 'win32': ...
if sys.version_info >= (3, 3) and sys.platform != 'win32': ...

See:

Seems like it's all sys.version_info and sys.platform.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions