ratchets

Mirror of ratchets, my python testing utility
git clone git://git.laack.co/ratchets.git
Log | Files | Refs | README | LICENSE

default_minus_1.toml (729B)


      1 # these will be ran in *parallel
      2 # (gthreads)
      3 
      4 [ratchet.regex.lightning]
      5 regex = "import pytorch_lightning|from pytorch_lightning"
      6 valid = ["import torch", "from my_project import Trainer"]
      7 invalid = ["import pytorch_lightning", "from pytorch_lightning import LightningModule"]
      8 
      9 [ratchet.regex.tabs]
     10 regex = "\\t"
     11 valid = [
     12   """def foo():
     13     return 42""",
     14   "print('no tab here')"
     15 ]
     16 invalid = [
     17   """\tprint('starts with tab')""",
     18   """def bar():
     19 \treturn True"""
     20 ]
     21 
     22 # printed text is assumed to be failures
     23 # each evaluation **must** accept a file path as input
     24 # these can be tested by running echo FILEPATH | COMMAND
     25 # these will be ran in parallel
     26 
     27 [ratchet.shell.line_too_long]
     28 command = "xargs -n1 awk 'length($0) > 80'"