perform some statix linting and fixes

This commit is contained in:
Tanish2002 2023-05-22 15:45:47 +05:30 committed by Gaétan Lepage
parent eee375e97e
commit efdcbe225f
57 changed files with 196 additions and 221 deletions

View file

@ -212,7 +212,7 @@ with lib; let
};
workspace = {
library = mkOption {
type = types.nullOr (types.either types.str (helpers.rawType));
type = types.nullOr (types.either types.str helpers.rawType);
description = ''
An array of abosolute or workspace-relative paths that will be added to the workspace
diagnosis - meaning you will get completion and context from these library files.
@ -356,6 +356,6 @@ with lib; let
];
in {
imports =
lib.lists.map (lspHelpers.mkLsp) servers
lib.lists.map lspHelpers.mkLsp servers
++ [./pylsp.nix];
}

View file

@ -16,12 +16,10 @@ in {
type = lib.types.nullOr (types.enum ["pycodestyle" "flake8"]);
description = "List of configuration sources to use.";
default = null;
apply = (
value:
if (value != null)
then [value]
else null
);
apply = value:
if (value != null)
then [value]
else null;
};
plugins = {
@ -502,8 +500,8 @@ in {
mkIf cfg.enable
{
extraPackages = let
isEnabled = x: (!isNull x) && (x.enabled == true);
plugins = cfg.settings.plugins;
isEnabled = x: (x != null) && (x.enabled != null && x.enabled);
inherit (cfg.settings) plugins;
in
lists.flatten (
(map