applied black formatter

This commit is contained in:
2022-01-18 14:03:56 +01:00
parent 742f4d1873
commit c3a0f31d19
36 changed files with 1762 additions and 782 deletions

View File

@ -27,18 +27,23 @@ limitations under the License.
@author R. Mueller
"""
import sys
try:
from tmtccmd.runner import initialize_tmtc_commander, run_tmtc_commander, add_ccsds_handler
from tmtccmd.runner import (
initialize_tmtc_commander,
run_tmtc_commander,
add_ccsds_handler,
)
from tmtccmd.ccsds.handler import CcsdsTmHandler
from tmtccmd.utility.logger import TMTC_LOGGER_NAME
except ImportError as error:
run_tmtc_commander = None
initialize_tmtc_commander = None
print(error)
print('Python tmtccmd submodule could not be imported')
print("Python tmtccmd submodule could not be imported")
print(
'Install with \"cd tmtccmd && python3 -m pip '
'install -e .[gui]\" for interactive installation'
'Install with "cd tmtccmd && python3 -m pip '
'install -e .[gui]" for interactive installation'
)
sys.exit(1)
@ -47,9 +52,9 @@ try:
from spacepackets.log import set_custom_console_logger_name
except ImportError as error:
print(error)
print('Python spacepackets module could not be imported')
print("Python spacepackets module could not be imported")
print(
'Install with \"cd spacepackets && python3 -m pip intall -e .\" for interative installation'
'Install with "cd spacepackets && python3 -m pip intall -e ." for interative installation'
)
sys.exit(1)
@ -61,12 +66,14 @@ from pus_tm.factory_hook import ccsds_tm_handler
def main():
hook_obj = EiveHookObject()
print(f'-- eive tmtc version {__version__} --')
print(f'-- spacepackets version {spacepackets.__version__} --')
print(f"-- eive tmtc version {__version__} --")
print(f"-- spacepackets version {spacepackets.__version__} --")
set_custom_console_logger_name(logger_name=TMTC_LOGGER_NAME)
initialize_tmtc_commander(hook_object=hook_obj)
ccsds_handler = CcsdsTmHandler()
ccsds_handler.add_tm_handler(apid=PUS_APID, pus_tm_handler=ccsds_tm_handler, max_queue_len=50)
ccsds_handler.add_tm_handler(
apid=PUS_APID, pus_tm_handler=ccsds_tm_handler, max_queue_len=50
)
add_ccsds_handler(ccsds_handler)
run_tmtc_commander(False)