evennia/Makefile
Greg Taylor ac810054aa Add auto-formatting via black
Introduce black, a Python code formatter. Also a Makefile that
includes two common targets:

* fmt (auto-format the code)
* lint (lint the code and return non-zero if out of spec)

We can re-use the latter in CI.

By introducing a code formatter, we can cut down on stylistic
variations across a now-large codebase. We can also avoid most style
discussions in PR if we just have this thing enforce it for us.
2019-09-22 10:23:28 +02:00

13 lines
215 B
Makefile

default: install
BLACK_FORMAT_CONFIGS = --target-version py37 --line-length 100
install:
python setup.py develop
fmt:
black $(BLACK_FORMAT_CONFIGS) evennia
lint:
black --check $(BLACK_FORMAT_CONFIGS) evennia