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 relative imports in stubs #574

Closed
@MikhailArkhipov

Description

@MikhailArkhipov

Since typeshed root is not in the path resolver snapshot, os stub is unable to resolve path submodule since it uses

from . import path as path

This causes

import os
os.path.

not to show any completions. Works in 3.x.

Also, for stubs it may be worth resolving stub module first and then real module if the stub is missing. I.e. if A is a stub, import B should resolve to a stub for B and only if stub for B is not found, resolve to real B. This should improve performance of the analysis.

Test: OsPathMembers, Python 2.7

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions