Applying black formatting
- Fixing flake8 configuration to agree with black - Adding black validation check to github actions
This commit is contained in:
@@ -11,7 +11,12 @@ def parse_args():
|
||||
parser.add_argument("command")
|
||||
parser.add_argument("schema_file")
|
||||
parser.add_argument("struct_name")
|
||||
parser.add_argument("-d", "--defaults", help="include default values in json output", action="store_true")
|
||||
parser.add_argument(
|
||||
"-d",
|
||||
"--defaults",
|
||||
help="include default values in json output",
|
||||
action="store_true",
|
||||
)
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
@@ -41,9 +46,11 @@ def main():
|
||||
|
||||
command = args.command
|
||||
kwargs = vars(args)
|
||||
del kwargs['command']
|
||||
del kwargs["command"]
|
||||
|
||||
globals()[command](**kwargs) # hacky way to get defined functions, and call function with name=command
|
||||
globals()[command](
|
||||
**kwargs
|
||||
) # hacky way to get defined functions, and call function with name=command
|
||||
|
||||
|
||||
main()
|
||||
|
||||
@@ -3,7 +3,10 @@ import os
|
||||
import sys
|
||||
|
||||
import capnp
|
||||
capnp.add_import_hook([os.getcwd(), "/usr/local/include/"]) # change this to be auto-detected?
|
||||
|
||||
capnp.add_import_hook(
|
||||
[os.getcwd(), "/usr/local/include/"]
|
||||
) # change this to be auto-detected?
|
||||
|
||||
import test_capnp # noqa: E402
|
||||
|
||||
@@ -20,7 +23,7 @@ def encode(name):
|
||||
print(message.to_bytes())
|
||||
|
||||
|
||||
if sys.argv[1] == 'decode':
|
||||
if sys.argv[1] == "decode":
|
||||
decode(sys.argv[2])
|
||||
else:
|
||||
encode(sys.argv[2])
|
||||
|
||||
Reference in New Issue
Block a user