Skip to content

Mark imported symbols as public for Pyright compatibility#1302

Closed
ernstwi wants to merge 1 commit intomvantellingen:masterfrom
ernstwi:pyright-private-symbols
Closed

Mark imported symbols as public for Pyright compatibility#1302
ernstwi wants to merge 1 commit intomvantellingen:masterfrom
ernstwi:pyright-private-symbols

Conversation

@ernstwi
Copy link
Copy Markdown

@ernstwi ernstwi commented Mar 18, 2022

This is a fix for the following Pyright rule:

Imported symbols are considered private by default. If they use the “import A as A” (a redundant module alias), “from X import A as A” (a redundant symbol alias), or “from . import A” forms, symbol “A” is not private unless the name begins with an underscore.

The docs state that "typecheckers like Pyright" use this rule, but I don't know what standard this is based on TBH.

I ran make format after adding the aliases, which split all compound imports into separate lines.

@mvantellingen
Copy link
Copy Markdown
Owner

Seems duplicate with #1326 Closing this for now (although this was older)

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