Skip to content

stubgen: --include-private not effective for C modules #10580

@kmaehashi

Description

@kmaehashi

Bug Report

--include-private option of stubgen is not effective for C modules.

To Reproduce

Generate a stub for C modules with private members, e.g., by cythonizing:

# foo.pyx
def _foo(): pass

Then run stubgen -m foo to generate a stub.

Expected Behavior

_foo() does not appear in the stub unless --include-private is specified.

Actual Behavior

_foo() always appear in the stub.

Your Environment

  • Mypy version used: 0.812
  • Mypy command-line flags: n/a
  • Mypy configuration options from mypy.ini (and other config files): n/a
  • Python version used: 3.7.8
  • Operating system and version: Ubuntu 18.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions