python-lsp / pylsp-mypy

Mypy plugin for the Python LSP Server.
MIT License
118 stars 35 forks source link

chore: add missing config setting and allow mypy 0.920 #29

Closed omgitsaheadcrab closed 2 years ago

omgitsaheadcrab commented 2 years ago

Added check_untyped_defs the to test for unreachable code. This removes the restriction for mypy < 0.920.

Richardk2n commented 2 years ago

Correct, was debating with myself, wether I want to add it globally. Mypy checks far more than just types, so should it really limit its checking to just typed functions?

omgitsaheadcrab commented 2 years ago

Yeah I don't agree with their choice but I guess it just means the end user needs to ensure that setting is present in their own config if they expect the old behaviour.

I don't think you'll want to add config globally to the actual linter, this is really meant to be a proxy. I guess you could add it all tests but there's no other coverage at the moment.

Richardk2n commented 2 years ago

This is probably the way to go.The version is specified in requirements.txt and in setup.cfg could you please delte the other mention as well. Then I'll merge your PR.

omgitsaheadcrab commented 2 years ago

Ah, missed that. Should have grep'd :D