lxml / lxml-stubs

Type stubs for the lxml package
Other
43 stars 29 forks source link

Minimal Pyright config #53

Closed abelcheung closed 2 years ago

abelcheung commented 2 years ago

The reportPrivateUsage config is about the class of warning illustrated below:

圖片

Though mypy doesn't complain, pyright doesn't like exporting private variables, classes or types. However, given the widespread use of etree._Element (and a bunch of others), it makes sense to supress this kind of warning for pyright.

scoder commented 2 years ago

Thanks. Yeah, these warnings are really annoying. Mypy does it right here – if a type name starts with an underscore, then that's how it is. It's not a fault of the user (or anyone else, really).