tests/test-check-pyflakes.t
author Kyle Lippincott <spectral@google.com>
Mon, 16 Sep 2019 12:42:50 -0700
changeset 4847 0fecff9ac36d
parent 4333 824fcba2cdb4
permissions -rw-r--r--
cmdstate: avoid setting a default argument to a mutable object (`{}`) If there's ever more than one cmdstate for the lifetime of the process, this can cause surprising behavior where the later cmdstates pick up options from the earlier ones. I've not seen any evidence this is actually causing any issues, but it's subtle enough that it should probably be fixed to help save significant debugging time later.

#require test-repo pyflakes

Copied from Mercurial core (60ee2593a270)

  $ cd "`dirname "$TESTDIR"`"

run pyflakes on all tracked files ending in .py or without a file ending
(skipping binary file random-seed)

  $ hg locate -I 'set:(**.py or grep("^#!.*python")) - removed()' 2>/dev/null \
  > | xargs pyflakes 2>/dev/null