Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pyrightconfig.json file from templates #1402

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

taldcroft
Copy link
Member

It turns out that adding a pyrightconfig.json file is a bad idea: microsoft/pylance-release#6446

Basically adding even an empty pyrightconfig.json file ends up turning on type checking (it sets python.analysis.TypeCheckingMode to standard. Then simple code like this gets a warning:

x = {"b": "c"}
x["d"] = 1  # it thinks x is dict[str, str]

So we should remove this config file from our repos and individual users will need to configure VS code:

    "python.analysis.ignore": [
        "**/*.ipynb"
    ],

I think the other ignore values are not really needed in practice, but pylance really doesn't deal well with notebooks.

@taldcroft taldcroft changed the title Remove pyrightconfig.json file Remove pyrightconfig.json file from templates Sep 26, 2024
@taldcroft
Copy link
Member Author

@jeanconn
Copy link
Contributor

And I was just typing that this would need a wiki update - great.

Copy link
Contributor

@jeanconn jeanconn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be something to use again if the behavior is fixed.

@taldcroft taldcroft merged commit 304164f into master Sep 27, 2024
@taldcroft taldcroft deleted the remove-pyrightconfig-json branch September 27, 2024 14:05
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.

3 participants