diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-05-28 12:04:37 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-05-28 12:04:37 +0200 |
commit | c69331e4d925658b2bf26dcb387981f6530d7b9e (patch) | |
tree | d19c7f9b0bf51f68c104057e013630e009835268 /bin/generate-dummy-class.py | |
parent | 23927051ac3e64cabbaa6c30e8356dfe90ebfa6c (diff) |
use black(1) for uniform code formatting
Diffstat (limited to 'bin/generate-dummy-class.py')
-rwxr-xr-x | bin/generate-dummy-class.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/generate-dummy-class.py b/bin/generate-dummy-class.py index d86339b..9cfa7fb 100755 --- a/bin/generate-dummy-class.py +++ b/bin/generate-dummy-class.py @@ -5,19 +5,19 @@ from dfatool.codegen import MultipassDriver from dfatool.automata import PTA import yaml -with open('../multipass/model/driver/nrf24l01.dfa', 'r') as f: +with open("../multipass/model/driver/nrf24l01.dfa", "r") as f: driver_definition = yaml.safe_load(f) pta = PTA.from_yaml(driver_definition) -repo = Repo('../multipass/build/repo.acp') +repo = Repo("../multipass/build/repo.acp") enum = dict() -if 'dummygen' in driver_definition and 'enum' in driver_definition['dummygen']: - enum = driver_definition['dummygen']['enum'] +if "dummygen" in driver_definition and "enum" in driver_definition["dummygen"]: + enum = driver_definition["dummygen"]["enum"] -drv = MultipassDriver('Nrf24l01', pta, repo.class_by_name['Nrf24l01'], enum=enum) +drv = MultipassDriver("Nrf24l01", pta, repo.class_by_name["Nrf24l01"], enum=enum) -with open('../multipass/src/driver/dummy.cc', 'w') as f: +with open("../multipass/src/driver/dummy.cc", "w") as f: f.write(drv.impl) -with open('../multipass/include/driver/dummy.h', 'w') as f: +with open("../multipass/include/driver/dummy.h", "w") as f: f.write(drv.header) |