diff --git a/.mailmap b/.mailmap index 17a620af..5b86092e 100644 --- a/.mailmap +++ b/.mailmap @@ -1,3 +1,5 @@ +Andres Cuberos Andres Cuberos <31192632+acuberosatfluid@users.noreply.github.com> +Andres Cuberos Andres Cuberos Daniel Murcia Daniel F. Murcia Rivera Daniel Murcia Daniel Murcia <42251914+danmur97@users.noreply.github.com> Daniel Salazar Daniel Salazar @@ -22,5 +24,6 @@ Luis Saavedra Luis Saavedra Robin Hafid Robin Quintero Robin Quintero Sebastian Cardona Sebastian Cardona <132764573+sebas031811@users.noreply.github.com> +Sebastian Cardona Sebastian Cardona Sebastian Cardona Sebastian Cardona Timothy DeHerrera Timothy DeHerrera diff --git a/docs/src/api/builtins/format.md b/docs/src/api/builtins/format.md index 77ca35ef..7d5e929c 100644 --- a/docs/src/api/builtins/format.md +++ b/docs/src/api/builtins/format.md @@ -129,10 +129,10 @@ Types: - config (`atrrs`): Optional. - black (`path`): Optional. Path to the Black configuration file. - Defaults to `./settings-black.toml`. + Defaults to [./settings-black.toml](https://github.com/fluidattacks/makes/blob/main/src/evaluator/modules/format-python/settings-black.toml). - isort (`path`): Optional. Path to the isort configuration file. - Defaults to `./settings-isort.toml`. + Defaults to [./settings-isort.toml](https://github.com/fluidattacks/makes/blob/main/src/evaluator/modules/format-python/settings-isort.toml). - targets (`listOf str`): Optional. Files or directories (relative to the project) to format. Defaults to the entire project. diff --git a/docs/src/api/builtins/lint.md b/docs/src/api/builtins/lint.md index 12908f39..bdd510b8 100644 --- a/docs/src/api/builtins/lint.md +++ b/docs/src/api/builtins/lint.md @@ -250,6 +250,13 @@ Types: Definitions of python packages/modules to lint. Defaults to `{ }`. - dirOfModulesType (`submodule`): + - config (`atrrs`): Optional. + - mypy (`path`): Optional. + Path to the Mypy configuration file. + Defaults to [./settings-mypy.cfg](https://github.com/fluidattacks/makes/blob/main/src/evaluator/modules/lint-python/settings-mypy.cfg). + - prospector (`path`): Optional. + Path to the Prospector configuration file. + Defaults to [./settings-prospector.yaml](https://github.com/fluidattacks/makes/blob/main/src/evaluator/modules/lint-python/settings-prospector.yaml). - python (`enum ["3.8" "3.9" "3.10" "3.11"]`): Python interpreter version that your package/module is designed for. - searchPaths (`asIn makeSearchPaths`): Optional. @@ -266,6 +273,13 @@ Types: - src (`str`): Path to the package/module. - moduleType (`submodule`): + - config (`atrrs`): Optional. + - mypy (`path`): Optional. + Path to the Mypy configuration file. + Defaults to [./settings-mypy.cfg](https://github.com/fluidattacks/makes/blob/main/src/evaluator/modules/lint-python/settings-mypy.cfg). + - prospector (`path`): Optional. + Path to the Prospector configuration file. + Defaults to [./settings-prospector.yaml](https://github.com/fluidattacks/makes/blob/main/src/evaluator/modules/lint-python/settings-prospector.yaml). - python (`enum ["3.8" "3.9" "3.10" "3.11"]`): Python interpreter version that your package/module is designed for. - searchPaths (`asIn makeSearchPaths`): Optional. @@ -283,6 +297,7 @@ Example: lintPython = { dirsOfModules = { makes = { + config = {}; python = "3.8"; src = "/src/cli"; }; @@ -295,6 +310,7 @@ Example: }; modules = { cliMain = { + config = {}; python = "3.8"; src = "/src/cli/main"; }; diff --git a/src/evaluator/modules/lint-python/default.nix b/src/evaluator/modules/lint-python/default.nix index 2ecb8919..f79a069a 100644 --- a/src/evaluator/modules/lint-python/default.nix +++ b/src/evaluator/modules/lint-python/default.nix @@ -25,6 +25,7 @@ }; }; makeModule = name: { + config, searchPaths, python, src, @@ -34,12 +35,13 @@ inherit searchPaths; inherit name; inherit python; - settingsMypy = ./settings-mypy.cfg; - settingsProspector = ./settings-prospector.yaml; + settingsMypy = config.mypy; + settingsProspector = config.prospector; src = projectPath src; }; }; makeDirOfModules = name: { + config, searchPaths, python, src, @@ -50,6 +52,7 @@ name = "/lintPython/dirOfModules/${name}/${moduleName}"; inherit ((makeModule moduleName { + inherit config; inherit searchPaths; inherit python; src = "${src}/${moduleName}"; @@ -76,6 +79,16 @@ in { default = {}; type = lib.types.attrsOf (lib.types.submodule (_: { options = { + config = { + mypy = lib.mkOption { + default = ./settings-mypy.cfg; + type = lib.types.path; + }; + prospector = lib.mkOption { + default = ./settings-prospector.yaml; + type = lib.types.path; + }; + }; python = lib.mkOption { type = lib.types.enum ["3.8" "3.9" "3.10" "3.11"]; }; @@ -110,6 +123,16 @@ in { default = {}; type = lib.types.attrsOf (lib.types.submodule (_: { options = { + config = { + mypy = lib.mkOption { + default = ./settings-mypy.cfg; + type = lib.types.path; + }; + prospector = lib.mkOption { + default = ./settings-prospector.yaml; + type = lib.types.path; + }; + }; python = lib.mkOption { type = lib.types.enum ["3.8" "3.9" "3.10" "3.11"]; };