crux
November 8, 2024, 11:44pm
1
A noob here.
I’m usings writers.writePython3Bin to package a python script. I need to pass --ignore=E501
to the builder which is flake8. But how do I do it?
set flakeIgnore
to [ "E508" ]
in the 5th argument here, I guess:
makePythonWriter =
python: pythonPackages: buildPythonPackages: name:
{
libraries ? [ ],
flakeIgnore ? [ ],
doCheck ? true,
...
}@args:
let
ignoreAttribute =
optionalString (flakeIgnore != [ ])
"--ignore ${concatMapStringsSep "," escapeShellArg flakeIgnore}";
in
makeScriptWriter (
(builtins.removeAttrs args [
"libraries"
"flakeIgnore"
"doCheck"
])
// {
This file has been truncated. show original
crux
November 9, 2024, 12:18am
3
ah damn, so obvious, how did i overlook??
thanks a lot!
crux
November 19, 2024, 12:31pm
4
There is an even easier solution I also overlooked
You can just pass doCheck = false and avoid checking with linter in the first place