Skip to content

Pytest project structure not supported by Pyrefly import root heuristics #1486

Description

@connernilsen

Pytest projects typically have two checked directories:

  • src/
    • src/'s import root is itself. All files in src/ import from src/
  • tests/ (maybe test/?)
    • tests/ import root is its parent directory. We should support this in Configs, since right now the default config won't work at all in this directory.

We should do one of:

  • get rid of import root (or just use it for debugging stuff) and move its information into search_path
  • make import root an enum with a variant that can possibly work with multiple roots (one primary and one secondary for tests)

Activity

  1. added this to the V1 Release milestone on Jan 22, 2026
  2. added
    help wantedLarger than "good first issue", but still well-defined and ready for someone to pick up
    on Jan 29, 2026
  3. removed this from the V1 Release milestone on Mar 16, 2026
  4. iamhaseebn commented on Aug 21, 2026

    @iamhaseebn
    Contributor

    #claim

  5. github-actions commented on Aug 21, 2026

    @github-actions

    @iamhaseebn you've claimed this issue — it's now assigned to you. Thanks for picking it up! 🎉

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

Metadata

Metadata

Assignees

Labels

configurationhelp wantedLarger than "good first issue", but still well-defined and ready for someone to pick up

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions