tDo not depend on black for formatting anymore. - obelisk - Electrum server using libbitcoin as its backend HTML git clone https://git.parazyd.org/obelisk DIR Log DIR Files DIR Refs DIR README DIR LICENSE --- DIR commit 868b4f6843a3b5324325d37414a165469ab194d9 DIR parent 2cdb3c8bf5102a3348ef317e2f24925e12d25508 HTML Author: parazyd <parazyd@dyne.org> Date: Mon, 19 Apr 2021 23:24:44 +0200 Do not depend on black for formatting anymore. Diffstat: M Makefile | 9 +++++---- M README.md | 5 +++-- D res/format_code.py | 9 --------- 3 files changed, 8 insertions(+), 15 deletions(-) --- DIR diff --git a/Makefile b/Makefile t@@ -1,11 +1,12 @@ all: - @echo "Available targets" - @echo "make format - Format code" - @echo "make test - Run test units" + @echo "Available targets:" + @echo @echo "make coverage - Run test units and report code coverage" + @echo "make test - Run test units" + @echo "make format - Format code" format: - python3 ./res/format_code.py + yapf --style google -i -r . test: python3 tests DIR diff --git a/README.md b/README.md t@@ -62,8 +62,9 @@ in `obelisk/protocol.py` and `obelisk/zeromq.py`. `protocol.py` implements the ElectrumX protocol, and `zeromq.py` implements the libbitcoin side of things. -Before committing code, please run `make format` to format the codebase -to a certain code style. This script depends on `black` and `yapf`. +Before committing code, please run `make format` to format +the codebase to a certain code style. This script depends on +[yapf](https://github.com/google/yapf). It is also recommended to run the test suite and see if anything fails: DIR diff --git a/res/format_code.py b/res/format_code.py t@@ -1,9 +0,0 @@ -#!/usr/bin/env python3 -# Run this from the repo root to format the python codebase. -# Depends: -# black - https://github.com/psf/black -# yapf - https://github.com/google/yapf -from subprocess import run - -run(["black", "-l", "80", "."], check=True) -run(["yapf", "--style", "google", "-i", "-r", "."], check=True)