-
Notifications
You must be signed in to change notification settings - Fork 4
Developer
Gurhar Khalsa edited this page Jul 14, 2022
·
4 revisions
To format Python code use the Black formatter through pykern.pkcli.fmt
.
pykern fmt run <pathname>
The above example will format the singular .py
file that pathname
contains, or if pathname
is a directory it will format all .py
files recursively
pykern fmt diff <pathname>
diff
will show you the diff between the file/dir in pathname
and a formatted version of that file/dir, if there is any
pykern fmt check <pathname>
check
will trigger an exception if there is diff
Source in pykern.pkcli.ci
pykern ci check_prints
check_prints
recursively checks repo for (naked) print and pkdp calls
pykern ci run
run
will run continuous integration checks and tests. It calls check_prints
, checks the formatting, and then runs pykern.pkcli.test.default_command