mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-05-01 09:05:27 +00:00
make: Auto-format Python files, and update existing
This patch adds extends `make fmt` to auto-format Python files using `black`, and also runs it on the existing files.
This commit is contained in:
5
Makefile
5
Makefile
@@ -59,6 +59,11 @@ fmt:
|
|||||||
go vet ./...
|
go vet ./...
|
||||||
gofmt -s -w .
|
gofmt -s -w .
|
||||||
clang-format -i $(shell find . -iname '*.proto')
|
clang-format -i $(shell find . -iname '*.proto')
|
||||||
|
black -l 79 \
|
||||||
|
test/util/check-hostaliases \
|
||||||
|
test/util/chamuyero \
|
||||||
|
test/util/mail_diff \
|
||||||
|
internal/tlsconst/generate-ciphers.py
|
||||||
|
|
||||||
.PHONY: chasquid test \
|
.PHONY: chasquid test \
|
||||||
chasquid-util smtp-check mda-lmtp dovecot-auth-cli \
|
chasquid-util smtp-check mda-lmtp dovecot-auth-cli \
|
||||||
|
|||||||
@@ -38,8 +38,7 @@ def getCiphers():
|
|||||||
ciphers = getCiphers()
|
ciphers = getCiphers()
|
||||||
|
|
||||||
out = open(sys.argv[1], "w")
|
out = open(sys.argv[1], "w")
|
||||||
out.write(
|
out.write("""\
|
||||||
"""\
|
|
||||||
package tlsconst
|
package tlsconst
|
||||||
|
|
||||||
// AUTOGENERATED - DO NOT EDIT
|
// AUTOGENERATED - DO NOT EDIT
|
||||||
@@ -47,8 +46,7 @@ package tlsconst
|
|||||||
// This file was autogenerated by generate-ciphers.py.
|
// This file was autogenerated by generate-ciphers.py.
|
||||||
|
|
||||||
var cipherSuiteName = map[uint16]string{
|
var cipherSuiteName = map[uint16]string{
|
||||||
"""
|
""")
|
||||||
)
|
|
||||||
|
|
||||||
for ver, desc in ciphers:
|
for ver, desc in ciphers:
|
||||||
out.write('\t%s: "%s",\n' % (ver, desc))
|
out.write('\t%s: "%s",\n' % (ver, desc))
|
||||||
|
|||||||
Reference in New Issue
Block a user