Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Should stubtest verify the presence of __all__ in a stub? #13300

Closed
@hauntsaninja

Description

@hauntsaninja

See #12214

Currently, stubtest will not ensure that __all__ is present in the stub if it is present at runtime.

We will always check whether the stub has the symbols we need, so ensuring that __all__ is in the stub may just cause additional busywork for maintainers of stubs.

However, users may do module.__all__ at runtime. If stubtest doesn't ensure that __all__ is present in the stub, this means such users could get false positives when using such stubs.

However, if __all__ isn't in __all__ is it a public API? stubtest will ensure that __all__ is present in the stub if __all__ is in __all__.

Anyway, busywork is my main concern here. The change itself is very easy: 02b4f14

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions