sot / skare3

Conda recipes for ska environment packages
4 stars 4 forks source link

Remove pyrightconfig.json file from templates #1402

Closed taldcroft closed 1 month ago

taldcroft commented 1 month ago

It turns out that adding a pyrightconfig.json file is a bad idea: https://github.com/microsoft/pylance-release/issues/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 commented 1 month ago

And I just fixed https://github.com/sot/skare3/wiki/Configuration-for-linting-and-formatting-with-ruff.

jeanconn commented 1 month ago

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