obelisk

Electrum server using libbitcoin as its backend
git clone https://git.parazyd.org/obelisk
Log | Files | Refs | README | LICENSE

commit 868b4f6843a3b5324325d37414a165469ab194d9
parent 2cdb3c8bf5102a3348ef317e2f24925e12d25508
Author: parazyd <parazyd@dyne.org>
Date:   Mon, 19 Apr 2021 23:24:44 +0200

Do not depend on black for formatting anymore.

Diffstat:
MMakefile | 9+++++----
MREADME.md | 5+++--
Dres/format_code.py | 9---------
3 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/Makefile b/Makefile @@ -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 diff --git a/README.md b/README.md @@ -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: diff --git a/res/format_code.py b/res/format_code.py @@ -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)