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