python: Use pyright instead of mypy
Right now doesn't wake up in .config/dotfiles for some reason
This commit is contained in:
parent
d157e374e6
commit
3c40ee1c21
1 changed files with 11 additions and 18 deletions
|
@ -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
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue