Skip to content

lazy-import-mismatch - false positive in stubs #29070

Closed

Description

@DetachHead

Summary

# foo.pyi
from collections.abc import Iterable # error: Use a `lazy` import instead of an eager import

lazy has no effect in .pyi files AFAIK so the rule should not apply to them. it should probably also enforce no lazy imports in stubs

Version

No response

Activity

  1. added
    bug
    on Oct 2, 2026
  2. ntBre commented on Oct 2, 2026

    @ntBre
    Contributor

    it should probably also enforce no lazy imports in stubs

    This part feels like a separate rule to me, but yeah, we should skip this rule in stubs.

  3. added a commit that references this issue on Oct 6, 2026
    6a50305
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions