Skip to content

fix pytest goto definition support conftest #3775#3830

Open
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:3775
Open

fix pytest goto definition support conftest #3775#3830
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:3775

Conversation

@asukaminato0721

Copy link
Copy Markdown
Contributor

Summary

Fixes #3775

Pytest fixture go-to-definition now falls back from same-file fixture lookup to visible conftest.py / conftest.pyi files, walking upward from the test file directory and stopping at the first matching conftest fixture.

The shared conftest discovery is now reused by the fixture annotation quick fix too.

Test Plan

@github-actions

Copy link
Copy Markdown

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pytest goto definition support conftest

1 participant