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 ./...
|
||||
gofmt -s -w .
|
||||
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 \
|
||||
chasquid-util smtp-check mda-lmtp dovecot-auth-cli \
|
||||
|
||||
@@ -27,7 +27,7 @@ message Recipient {
|
||||
enum Type {
|
||||
EMAIL = 0;
|
||||
PIPE = 1;
|
||||
FORWARD = 2;
|
||||
FORWARD = 2;
|
||||
}
|
||||
Type type = 2;
|
||||
|
||||
@@ -45,8 +45,8 @@ message Recipient {
|
||||
// cases.
|
||||
string original_address = 5;
|
||||
|
||||
// The list of servers to use, for recipients of type == FORWARD.
|
||||
repeated string via = 6;
|
||||
// The list of servers to use, for recipients of type == FORWARD.
|
||||
repeated string via = 6;
|
||||
}
|
||||
|
||||
// Timestamp representation, for convenience.
|
||||
|
||||
@@ -38,8 +38,7 @@ def getCiphers():
|
||||
ciphers = getCiphers()
|
||||
|
||||
out = open(sys.argv[1], "w")
|
||||
out.write(
|
||||
"""\
|
||||
out.write("""\
|
||||
package tlsconst
|
||||
|
||||
// AUTOGENERATED - DO NOT EDIT
|
||||
@@ -47,8 +46,7 @@ package tlsconst
|
||||
// This file was autogenerated by generate-ciphers.py.
|
||||
|
||||
var cipherSuiteName = map[uint16]string{
|
||||
"""
|
||||
)
|
||||
""")
|
||||
|
||||
for ver, desc in ciphers:
|
||||
out.write('\t%s: "%s",\n' % (ver, desc))
|
||||
|
||||
@@ -29,4 +29,4 @@ message Plain {
|
||||
bytes password = 1;
|
||||
}
|
||||
|
||||
message Denied { }
|
||||
message Denied {}
|
||||
|
||||
Reference in New Issue
Block a user