Skip to content

Moving a .pyi file shoudn't move it's .py twin when under the typings folder #5562

Description

@bschnurr

Environment data

  • Language Server version: XXX
  • OS and version: XXX
  • Python version (& distribution if applicable, e.g. Anaconda): XXX

Code Snippet

ousideLib/needs_stub.py

def foo(x):
    return x

typings/needs_stub.pyi

def foo(x:int) -> int: ...

test.py

from needs_stub import foo
foo(1)

settings.json

    "python.analysis.extraPaths": [
        "./outsideLib"
    ],
    "python.analysis.stubPath": "typings"

Repro Steps

  1. Create a new folder under typings
  2. Drag needs_stub.pyi into it
  3. Notice that need_stub.py also gets moved

Expected behavior

We dont bring in .py files under the stubPath folder when moving .pyi files.

Actual behavior

typings/newfolder/needs_stub.py
typings/newfolder/needs_stub.pyi

Logs

XXX

Metadata

Metadata

Assignees

Labels

fixed in next version (main)A fix has been implemented and will appear in an upcoming versionrepro workspaceIssue has a retained repro workspace

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions