Nix-writers: Difference between revisions
imported>Lassulus No edit summary |
imported>MrVanDalo No edit summary |
||
Line 82: | Line 82: | ||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
writePython2 "test_python2" { | writePython2 "test_python2" { | ||
deps = [ pkgs.python2Packages.enum ]; | |||
} '' | } '' | ||
from enum import Enum | from enum import Enum | ||
Line 97: | Line 97: | ||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
writePython3 "test_python3" { | writePython3 "test_python3" { | ||
deps = [ pkgs.python3Packages.pyyaml ]; | |||
} '' | |||
import yaml | |||
y = yaml.load(""" | |||
- test: success | |||
""") | |||
print(y[0]['test']) | |||
'' | |||
</syntaxHighlight> | |||
For disable errors use `flakeIgnore` | |||
writePython3 "test_python3" { | |||
deps = [ pkgs.python3Packages.pyyaml ]; | |||
flakeIgnore = [ "E265" "E225" ]; | |||
} '' | } '' | ||
import yaml | import yaml |