python: Use pyright instead of mypy

Right now doesn't wake up in .config/dotfiles for some reason
This commit is contained in:
Geoffrey Frogeye 2025-05-09 13:42:45 +02:00
parent d157e374e6
commit 3c40ee1c21

View file

@ -27,7 +27,7 @@
lint = { lint = {
select = [ "ALL" ]; select = [ "ALL" ];
ignore = [ ignore = [
# Things that don't teach me to write better Python # Things only relevant in proper applications, but not scripts
"CPY" # Copyright "CPY" # Copyright
"D1" # missing docstring "D1" # missing docstring
"ERA" # commented out code "ERA" # commented out code
@ -48,24 +48,17 @@
}; };
}; };
}; };
nixvim.plugins.lsp.servers.pylsp = { nixvim.plugins.lsp.servers = lib.mkIf config.frogeye.dev.python {
# Python ruff.enable = true;
enable = config.frogeye.dev.python; basedpyright = {
settings.plugins = { enable = true;
ruff.enabled = true; settings.basedpyright = {
pylsp_mypy = { analysis = {
enabled = true; ignore = [ "*" ]; # Handled by ruff
overrides = [ typeCheckingMode = "standard"; # Should not be an hassle for scripting with untyped libraries
"--cache-dir=${config.xdg.cacheHome}/mypy" };
"--ignore-missing-imports" disableOrganizeImports = true; # Handled by ruff
"--disallow-untyped-defs"
"--disallow-untyped-calls"
"--disallow-incomplete-defs"
"--disallow-untyped-decorators"
true
];
}; };
# TODO Could add some, could also remove some
}; };
}; };
}; };