Skip to content

Draft: refactor: prefix private TypeVars with "_" - #653

Draft
spaceone wants to merge 1 commit into
python-ldap:mainfrom
spaceone:refactor/private-type-vars
Draft

spaceone wants to merge 1 commit into
python-ldap:mainfrom
spaceone:refactor/private-type-vars

Conversation

@spaceone

@spaceone spaceone commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

to satisfy flake8-pyi Y001 Name of private TypeVar must start with _.

but grr. then one needs to use stubgen --include-private which will cause:

 stubs/python-ldap/ldap/cidict.pyi:11:5: Y035 "__slots__" in a stub file must have a value, as it has the same semantics as "__slots__" at runtime.
  stubs/python-ldap/ldap/schema/models.pyi:27:5: Y029 Defining __repr__ or __str__ in a stub is almost always redundant

Issue: #368

to satisfy flake8-pyi `Y001 Name of private TypeVar must start with _`

Issue: python-ldap#368
@spaceone spaceone changed the title refactor: prefix private TypeVars with "_" Draft: refactor: prefix private TypeVars with "_" Sep 16, 2026
@mistotebe mistotebe added this to the 3.5.0 milestone Sep 23, 2026
@mistotebe

Copy link
Copy Markdown
Contributor

It has draft in the title but github isn't showing it as draft state. Just checking which it is for review purposes (i.e. have you resolved the stubgen issues or is it pending other stuff?)

@spaceone

Copy link
Copy Markdown
Contributor Author

jeah, it's a draft because the pre-commit linters of python/typeshed#16395 fight against each other. I would prefer that stubgen works OOTB without including privates. But that's a long path.

I can't set the official draft state here in github somehow. Please don't merge it.

@mistotebe
mistotebe marked this pull request as draft September 23, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants