From 710c6c2dae5a254747019f959d370b48cbcd12fb Mon Sep 17 00:00:00 2001 From: sadra Date: Sat, 2 Apr 2022 15:22:58 +0430 Subject: [PATCH 1/3] using \t instead if raw spaces --- Utils/topologyTool.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Utils/topologyTool.py b/Utils/topologyTool.py index 11d99b90eb..d334ecfb9a 100644 --- a/Utils/topologyTool.py +++ b/Utils/topologyTool.py @@ -84,8 +84,8 @@ def tag_object_to_string(tag_obj): if type(internal_item) == str: out += internal_item else: - out += "\n " + tag_object_to_string(internal_item).replace( - "\n", "\n " + out += "\n\t" + tag_object_to_string(internal_item).replace( + "\n", "\n\t" ) final_line_break = "\n" @@ -216,7 +216,7 @@ def command_index_print(xml_list): # Print table print(xml_path + "\n") header_list = [ - " Component Name ", + "\t\tComponent Name\t\t", "Command Index", "Command Registration Index", ] From c8310c1ea771df40dd3c1d40de066403653383a3 Mon Sep 17 00:00:00 2001 From: sadra Date: Sat, 2 Apr 2022 15:23:49 +0430 Subject: [PATCH 2/3] isort observed --- Autocoders/Python/bin/codegen.py | 25 ++---- Autocoders/Python/bin/gds_dictgen.py | 4 +- Autocoders/Python/bin/implgen.py | 13 +--- Autocoders/Python/bin/pymod_dictgen.py | 20 ++--- Autocoders/Python/bin/testgen.py | 26 ++----- Autocoders/Python/bin/tlm_packet_gen.py | 20 ++--- Autocoders/Python/schema/testSchemas.py | 1 - .../src/fprime_ac/generators/GenFactory.py | 76 +++++-------------- .../generators/visitors/AbstractVisitor.py | 6 +- .../generators/visitors/ChannelVisitor.py | 5 +- .../generators/visitors/CommandVisitor.py | 6 +- .../visitors/ComponentVisitorBase.py | 1 - .../generators/visitors/EventVisitor.py | 5 +- .../visitors/InstanceChannelVisitor.py | 5 +- .../visitors/InstanceCommandVisitor.py | 6 +- .../visitors/InstanceEventVisitor.py | 5 +- .../visitors/InstanceSerializableVisitor.py | 8 +- .../InstanceTopologyChannelsHTMLVisitor.py | 2 - .../InstanceTopologyCmdHTMLVisitor.py | 2 - .../visitors/InstanceTopologyCppVisitor.py | 6 +- .../InstanceTopologyEventsHTMLVisitor.py | 2 - .../visitors/InstanceTopologyHVisitor.py | 6 +- .../generators/visitors/PortCppVisitor.py | 15 ++-- .../generators/visitors/PortHVisitor.py | 20 ++--- .../generators/visitors/SerialCppVisitor.py | 11 +-- .../generators/visitors/SerialHVisitor.py | 18 ++--- .../visitors/SerializableVisitor.py | 8 +- .../generators/visitors/TopologyCppVisitor.py | 6 +- .../generators/visitors/TopologyHVisitor.py | 6 +- .../generators/visitors/TopologyIDVisitor.py | 2 - .../generators/writers/ComponentWriterBase.py | 7 +- .../generators/writers/InstChannelWriter.py | 5 +- .../generators/writers/InstCommandWriter.py | 6 +- .../generators/writers/InstEventWriter.py | 5 +- .../src/fprime_ac/models/CompFactory.py | 13 +--- .../src/fprime_ac/models/TopoFactory.py | 8 +- .../src/fprime_ac/parsers/XmlArrayParser.py | 14 ++-- .../fprime_ac/parsers/XmlComponentParser.py | 20 ++--- .../src/fprime_ac/parsers/XmlEnumParser.py | 9 +-- .../src/fprime_ac/parsers/XmlPortsParser.py | 3 +- .../fprime_ac/parsers/XmlSerializeParser.py | 11 +-- .../fprime_ac/parsers/XmlTopologyParser.py | 17 ++--- .../src/fprime_ac/utils/ArrayGenerator.py | 9 +-- .../src/fprime_ac/utils/ConfigManager.py | 2 +- .../src/fprime_ac/utils/EnumGenerator.py | 3 +- .../Python/src/fprime_ac/utils/ParseC.py | 13 +--- .../src/fprime_ac/utils/TopDictGenerator.py | 15 +--- .../Python/src/fprime_ac/utils/version.py | 1 - .../Python/test/dictgen/test_dictgen.py | 3 +- RPI/test/int/rpi_integration_test.py | 4 +- Ref/test/int/ref_integration_test.py | 4 +- Utils/topologyTool.py | 5 +- cmake/autocoder/ai-parser/ai_parser.py | 1 + .../fpp-locs-differ/fpp-locs-differ.py | 10 +-- .../fpp-wrapper/fpp-depend-parallelize.py | 3 +- cmake/docs/docs.py | 2 +- .../target/version/generate_version_header.py | 11 +-- cmake/test/src/cmake.py | 6 +- cmake/test/src/test_feature.py | 2 +- cmake/test/src/test_ref_shared.py | 3 +- cmake/test/src/test_unittests.py | 3 +- docs/doxygen/gh_pages.py | 5 +- 62 files changed, 185 insertions(+), 374 deletions(-) diff --git a/Autocoders/Python/bin/codegen.py b/Autocoders/Python/bin/codegen.py index 9069cd308c..5ad2e568fd 100755 --- a/Autocoders/Python/bin/codegen.py +++ b/Autocoders/Python/bin/codegen.py @@ -14,28 +14,17 @@ import traceback from optparse import OptionParser -from lxml import etree - # Meta-model for Component only generation from fprime_ac.models import CompFactory, PortFactory, Serialize, TopoFactory - # Parsers to read the XML -from fprime_ac.parsers import ( - XmlComponentParser, - XmlParser, - XmlPortsParser, - XmlSerializeParser, - XmlTopologyParser, -) -from fprime_ac.utils import ( - ArrayGenerator, - ConfigManager, - EnumGenerator, - Logger, - TopDictGenerator, -) -from fprime_ac.utils.buildroot import get_build_roots, search_for_file, set_build_roots +from fprime_ac.parsers import (XmlComponentParser, XmlParser, XmlPortsParser, + XmlSerializeParser, XmlTopologyParser) +from fprime_ac.utils import (ArrayGenerator, ConfigManager, EnumGenerator, + Logger, TopDictGenerator) +from fprime_ac.utils.buildroot import (get_build_roots, search_for_file, + set_build_roots) from fprime_ac.utils.version import get_fprime_version, get_project_version +from lxml import etree # Generators to produce the code try: diff --git a/Autocoders/Python/bin/gds_dictgen.py b/Autocoders/Python/bin/gds_dictgen.py index a08396eb80..7b9e4ed6a4 100755 --- a/Autocoders/Python/bin/gds_dictgen.py +++ b/Autocoders/Python/bin/gds_dictgen.py @@ -17,16 +17,14 @@ import sys from optparse import OptionParser -from lxml import etree - # Meta-model for Component only generation from fprime_ac.models import TopoFactory - # Parsers to read the XML from fprime_ac.parsers import XmlParser, XmlTopologyParser from fprime_ac.utils import ConfigManager, TopDictGenerator from fprime_ac.utils.buildroot import get_build_roots, set_build_roots from fprime_ac.utils.version import get_fprime_version, get_project_version +from lxml import etree # Generators to produce the code try: diff --git a/Autocoders/Python/bin/implgen.py b/Autocoders/Python/bin/implgen.py index 2b1d4d8ed3..48e633d588 100755 --- a/Autocoders/Python/bin/implgen.py +++ b/Autocoders/Python/bin/implgen.py @@ -18,19 +18,14 @@ from optparse import OptionParser from fprime_ac.generators.writers import ImplCppWriter, ImplHWriter - # Meta-model for Component only generation from fprime_ac.models import CompFactory - # Parsers to read the XML -from fprime_ac.parsers import ( - XmlComponentParser, - XmlParser, - XmlPortsParser, - XmlSerializeParser, -) +from fprime_ac.parsers import (XmlComponentParser, XmlParser, XmlPortsParser, + XmlSerializeParser) from fprime_ac.utils import ConfigManager, Logger -from fprime_ac.utils.buildroot import get_build_roots, search_for_file, set_build_roots +from fprime_ac.utils.buildroot import (get_build_roots, search_for_file, + set_build_roots) from utils.pathmaker import setup_fprime_autocoder_path setup_fprime_autocoder_path() diff --git a/Autocoders/Python/bin/pymod_dictgen.py b/Autocoders/Python/bin/pymod_dictgen.py index 4817631f48..ae0bb282c6 100755 --- a/Autocoders/Python/bin/pymod_dictgen.py +++ b/Autocoders/Python/bin/pymod_dictgen.py @@ -17,24 +17,16 @@ import sys from optparse import OptionParser -from fprime_ac.generators.writers import ( - InstChannelWriter, - InstCommandWriter, - InstEventWriter, -) - +from fprime_ac.generators.writers import (InstChannelWriter, InstCommandWriter, + InstEventWriter) # Meta-model for Component only generation from fprime_ac.models import CompFactory, ModelParser, TopoFactory - # Parsers to read the XML -from fprime_ac.parsers import ( - XmlParser, - XmlPortsParser, - XmlSerializeParser, - XmlTopologyParser, -) +from fprime_ac.parsers import (XmlParser, XmlPortsParser, XmlSerializeParser, + XmlTopologyParser) from fprime_ac.utils import ConfigManager -from fprime_ac.utils.buildroot import get_build_roots, search_for_file, set_build_roots +from fprime_ac.utils.buildroot import (get_build_roots, search_for_file, + set_build_roots) # Generators to produce the code try: diff --git a/Autocoders/Python/bin/testgen.py b/Autocoders/Python/bin/testgen.py index eaf9faf1ed..577dc6470d 100755 --- a/Autocoders/Python/bin/testgen.py +++ b/Autocoders/Python/bin/testgen.py @@ -19,28 +19,18 @@ import time from optparse import OptionParser -from fprime_ac.generators.writers import ( - ComponentTestCppWriter, - ComponentTestHWriter, - GTestCppWriter, - GTestHWriter, - TestImplCppWriter, - TestImplHWriter, - TestMainWriter, -) - +from fprime_ac.generators.writers import (ComponentTestCppWriter, + ComponentTestHWriter, GTestCppWriter, + GTestHWriter, TestImplCppWriter, + TestImplHWriter, TestMainWriter) # Meta-model for Component only generation from fprime_ac.models import CompFactory - # Parsers to read the XML -from fprime_ac.parsers import ( - XmlComponentParser, - XmlParser, - XmlPortsParser, - XmlSerializeParser, -) +from fprime_ac.parsers import (XmlComponentParser, XmlParser, XmlPortsParser, + XmlSerializeParser) from fprime_ac.utils import ConfigManager -from fprime_ac.utils.buildroot import get_build_roots, search_for_file, set_build_roots +from fprime_ac.utils.buildroot import (get_build_roots, search_for_file, + set_build_roots) # Generators to produce the code try: diff --git a/Autocoders/Python/bin/tlm_packet_gen.py b/Autocoders/Python/bin/tlm_packet_gen.py index 2b045ca01a..39e70cb810 100755 --- a/Autocoders/Python/bin/tlm_packet_gen.py +++ b/Autocoders/Python/bin/tlm_packet_gen.py @@ -13,28 +13,20 @@ # ALL RIGHTS RESERVED. U.S. Government Sponsorship acknowledged. # =============================================================================== +import logging import os import sys -import logging - from optparse import OptionParser +from Cheetah.Template import Template # Meta-model for Component only generation from fprime_ac.models import TopoFactory -from fprime_ac.parsers import XmlSerializeParser -from fprime_ac.parsers import XmlEnumParser -from fprime_ac.parsers import XmlArrayParser - # Parsers to read the XML -from fprime_ac.parsers import XmlTopologyParser - +from fprime_ac.parsers import (XmlArrayParser, XmlEnumParser, + XmlSerializeParser, XmlTopologyParser) +from fprime_ac.utils.buildroot import (get_nearest_build_root, search_for_file, + set_build_roots) from lxml import etree -from Cheetah.Template import Template -from fprime_ac.utils.buildroot import ( - search_for_file, - set_build_roots, - get_nearest_build_root, -) header_file_template = """ diff --git a/Autocoders/Python/schema/testSchemas.py b/Autocoders/Python/schema/testSchemas.py index 4e66cc261d..9b6f67f103 100644 --- a/Autocoders/Python/schema/testSchemas.py +++ b/Autocoders/Python/schema/testSchemas.py @@ -4,7 +4,6 @@ import pytest from lxml import etree - """ To add tests, go down to the setup function. """ diff --git a/Autocoders/Python/src/fprime_ac/generators/GenFactory.py b/Autocoders/Python/src/fprime_ac/generators/GenFactory.py index dee060e736..2ad9e39bb9 100644 --- a/Autocoders/Python/src/fprime_ac/generators/GenFactory.py +++ b/Autocoders/Python/src/fprime_ac/generators/GenFactory.py @@ -21,61 +21,27 @@ from fprime_ac.utils import Logger -from . import ( - DictBody, - DictHeader, - DictStart, - FinishSource, - HtmlDocPage, - HtmlStartPage, - Includes1, - Includes2, - InitFiles, - InstanceDictBody, - InstanceDictHeader, - InstanceDictStart, - MdDocPage, - MdStartPage, - Namespace, - Private, - Protected, - Public, - StartSource, -) -from .visitors import ( - ChannelVisitor, - CommandVisitor, - ComponentCppVisitor, - ComponentHVisitor, - ComponentTestCppVisitor, - ComponentTestHVisitor, - EventVisitor, - GTestCppVisitor, - GTestHVisitor, - HtmlDocVisitor, - ImplCppVisitor, - ImplHVisitor, - InstanceChannelVisitor, - InstanceCommandVisitor, - InstanceEventVisitor, - InstanceSerializableVisitor, - InstanceTopologyChannelsHTMLVisitor, - InstanceTopologyCmdHTMLVisitor, - InstanceTopologyCppVisitor, - InstanceTopologyEventsHTMLVisitor, - InstanceTopologyHVisitor, - MdDocVisitor, - PortCppVisitor, - PortHVisitor, - SerialCppVisitor, - SerialHVisitor, - SerializableVisitor, - TestImplCppVisitor, - TestImplHVisitor, - TopologyCppVisitor, - TopologyHVisitor, - TopologyIDVisitor, -) +from . import (DictBody, DictHeader, DictStart, FinishSource, HtmlDocPage, + HtmlStartPage, Includes1, Includes2, InitFiles, + InstanceDictBody, InstanceDictHeader, InstanceDictStart, + MdDocPage, MdStartPage, Namespace, Private, Protected, Public, + StartSource) +from .visitors import (ChannelVisitor, CommandVisitor, ComponentCppVisitor, + ComponentHVisitor, ComponentTestCppVisitor, + ComponentTestHVisitor, EventVisitor, GTestCppVisitor, + GTestHVisitor, HtmlDocVisitor, ImplCppVisitor, + ImplHVisitor, InstanceChannelVisitor, + InstanceCommandVisitor, InstanceEventVisitor, + InstanceSerializableVisitor, + InstanceTopologyChannelsHTMLVisitor, + InstanceTopologyCmdHTMLVisitor, + InstanceTopologyCppVisitor, + InstanceTopologyEventsHTMLVisitor, + InstanceTopologyHVisitor, MdDocVisitor, PortCppVisitor, + PortHVisitor, SerialCppVisitor, SerialHVisitor, + SerializableVisitor, TestImplCppVisitor, + TestImplHVisitor, TopologyCppVisitor, TopologyHVisitor, + TopologyIDVisitor) # Global logger init. below. PRINT = logging.getLogger("output") diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/AbstractVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/AbstractVisitor.py index f08f692280..d2760bf8a9 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/AbstractVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/AbstractVisitor.py @@ -17,10 +17,8 @@ import os import sys -from fprime_ac.utils.buildroot import ( - BuildRootMissingException, - build_root_relative_path, -) +from fprime_ac.utils.buildroot import (BuildRootMissingException, + build_root_relative_path) # # Python extension modules and custom interfaces diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/ChannelVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/ChannelVisitor.py index 849669baab..2edd79bf06 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/ChannelVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/ChannelVisitor.py @@ -22,7 +22,6 @@ from fprime_ac.generators import formatters from fprime_ac.generators.visitors import AbstractVisitor - # from fprime_ac.utils import DiffAndRename # # Python extension modules and custom interfaces @@ -35,8 +34,8 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.channels import ChannelHeader - from fprime_ac.generators.templates.channels import ChannelBody + from fprime_ac.generators.templates.channels import (ChannelBody, + ChannelHeader) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/CommandVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/CommandVisitor.py index 35045c7440..f2c849b9ae 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/CommandVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/CommandVisitor.py @@ -21,11 +21,9 @@ from getpass import getuser from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import Command, Parameter - # # Python extension modules and custom interfaces # @@ -37,8 +35,8 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.commands import CommandHeader - from fprime_ac.generators.templates.commands import CommandBody + from fprime_ac.generators.templates.commands import (CommandBody, + CommandHeader) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/ComponentVisitorBase.py b/Autocoders/Python/src/fprime_ac/generators/visitors/ComponentVisitorBase.py index 696197fdf6..188ea8584d 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/ComponentVisitorBase.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/ComponentVisitorBase.py @@ -23,7 +23,6 @@ from fprime_ac.generators import formatters from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser - # # Python extension modules and custom interfaces # diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/EventVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/EventVisitor.py index 002681b88d..a41080a4d6 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/EventVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/EventVisitor.py @@ -21,10 +21,8 @@ from getpass import getuser from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor - # # Python extension modules and custom interfaces # @@ -36,8 +34,7 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.events import EventHeader - from fprime_ac.generators.templates.events import EventBody + from fprime_ac.generators.templates.events import EventBody, EventHeader except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceChannelVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceChannelVisitor.py index fd39568bcb..02d6184c06 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceChannelVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceChannelVisitor.py @@ -22,7 +22,6 @@ from fprime_ac.generators import formatters from fprime_ac.generators.visitors import AbstractVisitor - # from fprime_ac.utils import DiffAndRename # # Python extension modules and custom interfaces @@ -35,8 +34,8 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.channels import ChannelHeader - from fprime_ac.generators.templates.channels import ChannelBody + from fprime_ac.generators.templates.channels import (ChannelBody, + ChannelHeader) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceCommandVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceCommandVisitor.py index 07f503c166..ac29754e3c 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceCommandVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceCommandVisitor.py @@ -21,11 +21,9 @@ from getpass import getuser from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import Command, Parameter - # # Python extension modules and custom interfaces # @@ -37,8 +35,8 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.commands import CommandHeader - from fprime_ac.generators.templates.commands import CommandBody + from fprime_ac.generators.templates.commands import (CommandBody, + CommandHeader) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceEventVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceEventVisitor.py index 577efbf32f..fb334ce0e7 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceEventVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceEventVisitor.py @@ -21,10 +21,8 @@ from getpass import getuser from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor - # # Python extension modules and custom interfaces # @@ -36,8 +34,7 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.events import EventHeader - from fprime_ac.generators.templates.events import EventBody + from fprime_ac.generators.templates.events import EventBody, EventHeader except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceSerializableVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceSerializableVisitor.py index 69bd5bee75..2cf7ea904e 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceSerializableVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceSerializableVisitor.py @@ -21,10 +21,8 @@ from getpass import getuser from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor - # # Python extension modules and custom interfaces # @@ -36,9 +34,9 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.serialize import SerialHeader - from fprime_ac.generators.templates.serialize import SerialImport - from fprime_ac.generators.templates.serialize import SerialBody + from fprime_ac.generators.templates.serialize import (SerialBody, + SerialHeader, + SerialImport) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyChannelsHTMLVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyChannelsHTMLVisitor.py index d1e1b03396..650ed7da10 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyChannelsHTMLVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyChannelsHTMLVisitor.py @@ -19,11 +19,9 @@ import sys from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser - # # Python extension modules and custom interfaces # diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyCmdHTMLVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyCmdHTMLVisitor.py index f9ea7932af..a4d0afc447 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyCmdHTMLVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyCmdHTMLVisitor.py @@ -19,11 +19,9 @@ import sys from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser - # # Python extension modules and custom interfaces # diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyCppVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyCppVisitor.py index 25c7b3e5fe..212633ec27 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyCppVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyCppVisitor.py @@ -18,11 +18,9 @@ import sys from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser - # # Python extension modules and custom interfaces # @@ -34,8 +32,8 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.topology import includes1TopologyCpp - from fprime_ac.generators.templates.topology import publicInstanceTopologyCpp + from fprime_ac.generators.templates.topology import ( + includes1TopologyCpp, publicInstanceTopologyCpp) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyEventsHTMLVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyEventsHTMLVisitor.py index d29a932c48..ff64e6c84d 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyEventsHTMLVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyEventsHTMLVisitor.py @@ -19,11 +19,9 @@ import sys from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser - # # Python extension modules and custom interfaces # diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyHVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyHVisitor.py index eabaaa64d4..535e56dd12 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyHVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyHVisitor.py @@ -18,11 +18,9 @@ import sys from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser - # # Python extension modules and custom interfaces # @@ -34,8 +32,8 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.topology import includes1TopologyH - from fprime_ac.generators.templates.topology import publicInstanceTopologyH + from fprime_ac.generators.templates.topology import ( + includes1TopologyH, publicInstanceTopologyH) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/PortCppVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/PortCppVisitor.py index 84e5baa5ac..39146e3cd2 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/PortCppVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/PortCppVisitor.py @@ -18,27 +18,24 @@ import sys from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor - # # Python extension modules and custom interfaces # # from Cheetah import Template # from fprime_ac.utils import version -from fprime_ac.utils import ConfigManager -from fprime_ac.utils import TypesList +from fprime_ac.utils import ConfigManager, TypesList # # Import precompiled templates here # try: - from fprime_ac.generators.templates.port import includes1PortCpp - from fprime_ac.generators.templates.port import namespacePortCpp - from fprime_ac.generators.templates.port import publicPortCpp - from fprime_ac.generators.templates.port import privatePortCpp - from fprime_ac.generators.templates.port import finishPortCpp + from fprime_ac.generators.templates.port import (finishPortCpp, + includes1PortCpp, + namespacePortCpp, + privatePortCpp, + publicPortCpp) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/PortHVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/PortHVisitor.py index 736525f50c..83c66f50c9 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/PortHVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/PortHVisitor.py @@ -20,30 +20,26 @@ from getpass import getuser from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor - # # Python extension modules and custom interfaces # # from Cheetah import Template # from fprime_ac.utils import version -from fprime_ac.utils import ConfigManager -from fprime_ac.utils import TypesList +from fprime_ac.utils import ConfigManager, TypesList # # Import precompiled templates here # try: - from fprime_ac.generators.templates.port import startPortH - from fprime_ac.generators.templates.port import includes1PortH - from fprime_ac.generators.templates.port import includes2PortH - from fprime_ac.generators.templates.port import namespacePortH - from fprime_ac.generators.templates.port import publicPortH - from fprime_ac.generators.templates.port import protectedPortH - from fprime_ac.generators.templates.port import privatePortH - from fprime_ac.generators.templates.port import finishPortH + from fprime_ac.generators.templates.port import (finishPortH, + includes1PortH, + includes2PortH, + namespacePortH, + privatePortH, + protectedPortH, + publicPortH, startPortH) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/SerialCppVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/SerialCppVisitor.py index 2c30196995..8dec8741eb 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/SerialCppVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/SerialCppVisitor.py @@ -18,10 +18,8 @@ import sys from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor - # # Python extension modules and custom interfaces # @@ -33,12 +31,11 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.serialize import includes1SerialCpp - from fprime_ac.generators.templates.serialize import namespaceSerialCpp - from fprime_ac.generators.templates.serialize import publicSerialCpp - # from fprime_ac.generators.templates import privateSerialCpp - from fprime_ac.generators.templates.serialize import finishSerialCpp + from fprime_ac.generators.templates.serialize import (finishSerialCpp, + includes1SerialCpp, + namespaceSerialCpp, + publicSerialCpp) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/SerialHVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/SerialHVisitor.py index a616b79f15..a7d0e3f65d 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/SerialHVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/SerialHVisitor.py @@ -20,10 +20,8 @@ from getpass import getuser from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor - # # Python extension modules and custom interfaces # @@ -35,14 +33,14 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.serialize import startSerialH - from fprime_ac.generators.templates.serialize import includes1SerialH - from fprime_ac.generators.templates.serialize import includes2SerialH - from fprime_ac.generators.templates.serialize import namespaceSerialH - from fprime_ac.generators.templates.serialize import publicSerialH - from fprime_ac.generators.templates.serialize import protectedSerialH - from fprime_ac.generators.templates.serialize import privateSerialH - from fprime_ac.generators.templates.serialize import finishSerialH + from fprime_ac.generators.templates.serialize import (finishSerialH, + includes1SerialH, + includes2SerialH, + namespaceSerialH, + privateSerialH, + protectedSerialH, + publicSerialH, + startSerialH) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/SerializableVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/SerializableVisitor.py index 460a7b1455..29a272deb3 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/SerializableVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/SerializableVisitor.py @@ -21,10 +21,8 @@ from getpass import getuser from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor - # # Python extension modules and custom interfaces # @@ -36,9 +34,9 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.serialize import SerialHeader - from fprime_ac.generators.templates.serialize import SerialImport - from fprime_ac.generators.templates.serialize import SerialBody + from fprime_ac.generators.templates.serialize import (SerialBody, + SerialHeader, + SerialImport) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyCppVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyCppVisitor.py index 4330801e3c..ed6fb046f3 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyCppVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyCppVisitor.py @@ -18,11 +18,9 @@ import sys from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser - # # Python extension modules and custom interfaces # @@ -34,8 +32,8 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.topology import includes1TopologyCpp - from fprime_ac.generators.templates.topology import publicTopologyCpp + from fprime_ac.generators.templates.topology import (includes1TopologyCpp, + publicTopologyCpp) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyHVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyHVisitor.py index 08e804e56b..1a814c6dd2 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyHVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyHVisitor.py @@ -18,11 +18,9 @@ import sys from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser - # # Python extension modules and custom interfaces # @@ -34,8 +32,8 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.topology import includes1TopologyH - from fprime_ac.generators.templates.topology import publicTopologyH + from fprime_ac.generators.templates.topology import (includes1TopologyH, + publicTopologyH) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyIDVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyIDVisitor.py index 31e4d4420a..b222502a6a 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyIDVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyIDVisitor.py @@ -18,11 +18,9 @@ import sys from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser - # # Python extension modules and custom interfaces # diff --git a/Autocoders/Python/src/fprime_ac/generators/writers/ComponentWriterBase.py b/Autocoders/Python/src/fprime_ac/generators/writers/ComponentWriterBase.py index dd01a621b7..04d771e293 100644 --- a/Autocoders/Python/src/fprime_ac/generators/writers/ComponentWriterBase.py +++ b/Autocoders/Python/src/fprime_ac/generators/writers/ComponentWriterBase.py @@ -24,15 +24,12 @@ from fprime_ac.generators import formatters from fprime_ac.generators.writers import AbstractWriter from fprime_ac.models import ModelParser - # # Python extension modules and custom interfaces # from fprime_ac.utils import ConfigManager -from fprime_ac.utils.buildroot import ( - BuildRootMissingException, - build_root_relative_path, -) +from fprime_ac.utils.buildroot import (BuildRootMissingException, + build_root_relative_path) # # Global logger init. below. diff --git a/Autocoders/Python/src/fprime_ac/generators/writers/InstChannelWriter.py b/Autocoders/Python/src/fprime_ac/generators/writers/InstChannelWriter.py index 33479744e9..78baa679a3 100644 --- a/Autocoders/Python/src/fprime_ac/generators/writers/InstChannelWriter.py +++ b/Autocoders/Python/src/fprime_ac/generators/writers/InstChannelWriter.py @@ -22,7 +22,6 @@ from fprime_ac.generators import formatters from fprime_ac.generators.writers import AbstractDictWriter - # from fprime_ac.utils import DiffAndRename # # Python extension modules and custom interfaces @@ -35,8 +34,8 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.channels import ChannelHeader - from fprime_ac.generators.templates.channels import ChannelBody + from fprime_ac.generators.templates.channels import (ChannelBody, + ChannelHeader) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/writers/InstCommandWriter.py b/Autocoders/Python/src/fprime_ac/generators/writers/InstCommandWriter.py index 899b26baa9..4dc7bb316d 100644 --- a/Autocoders/Python/src/fprime_ac/generators/writers/InstCommandWriter.py +++ b/Autocoders/Python/src/fprime_ac/generators/writers/InstCommandWriter.py @@ -21,11 +21,9 @@ from getpass import getuser from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.writers import AbstractDictWriter from fprime_ac.models import Command, Parameter - # # Python extension modules and custom interfaces # @@ -37,8 +35,8 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.commands import CommandHeader - from fprime_ac.generators.templates.commands import CommandBody + from fprime_ac.generators.templates.commands import (CommandBody, + CommandHeader) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/writers/InstEventWriter.py b/Autocoders/Python/src/fprime_ac/generators/writers/InstEventWriter.py index ced2a22865..75a463235b 100644 --- a/Autocoders/Python/src/fprime_ac/generators/writers/InstEventWriter.py +++ b/Autocoders/Python/src/fprime_ac/generators/writers/InstEventWriter.py @@ -21,10 +21,8 @@ from getpass import getuser from fprime_ac.generators import formatters - # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.writers import AbstractDictWriter - # # Python extension modules and custom interfaces # @@ -36,8 +34,7 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.events import EventHeader - from fprime_ac.generators.templates.events import EventBody + from fprime_ac.generators.templates.events import EventBody, EventHeader except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/models/CompFactory.py b/Autocoders/Python/src/fprime_ac/models/CompFactory.py index 5ab0e359ee..587c1aa538 100644 --- a/Autocoders/Python/src/fprime_ac/models/CompFactory.py +++ b/Autocoders/Python/src/fprime_ac/models/CompFactory.py @@ -19,17 +19,8 @@ import logging import sys -from fprime_ac.models import ( - Arg, - Channel, - Command, - Component, - Event, - InternalInterface, - Parameter, - Port, - Serialize, -) +from fprime_ac.models import (Arg, Channel, Command, Component, Event, + InternalInterface, Parameter, Port, Serialize) # Global logger init. below. PRINT = logging.getLogger("output") diff --git a/Autocoders/Python/src/fprime_ac/models/TopoFactory.py b/Autocoders/Python/src/fprime_ac/models/TopoFactory.py index 82a92f185e..93d1ad4cd9 100644 --- a/Autocoders/Python/src/fprime_ac/models/TopoFactory.py +++ b/Autocoders/Python/src/fprime_ac/models/TopoFactory.py @@ -22,11 +22,9 @@ from fprime_ac.models import Component, Port, Topology from fprime_ac.parsers import XmlComponentParser from fprime_ac.utils import ConfigManager -from fprime_ac.utils.buildroot import ( - BuildRootCollisionException, - BuildRootMissingException, - locate_build_root, -) +from fprime_ac.utils.buildroot import (BuildRootCollisionException, + BuildRootMissingException, + locate_build_root) # from builtins import True # from Canvas import Window diff --git a/Autocoders/Python/src/fprime_ac/parsers/XmlArrayParser.py b/Autocoders/Python/src/fprime_ac/parsers/XmlArrayParser.py index 7c1a5044dc..3c19c751e4 100644 --- a/Autocoders/Python/src/fprime_ac/parsers/XmlArrayParser.py +++ b/Autocoders/Python/src/fprime_ac/parsers/XmlArrayParser.py @@ -16,18 +16,16 @@ # # Python standard modules # +import hashlib import logging import os import sys -import hashlib -from fprime_ac.utils import ConfigManager -from lxml import etree -from lxml import isoschematron + from fprime_ac.parsers import XmlParser -from fprime_ac.utils.exceptions import ( - FprimeXmlException, - FprimeRngXmlValidationException, -) +from fprime_ac.utils import ConfigManager +from fprime_ac.utils.exceptions import (FprimeRngXmlValidationException, + FprimeXmlException) +from lxml import etree, isoschematron # # Python extension modules and custom interfaces diff --git a/Autocoders/Python/src/fprime_ac/parsers/XmlComponentParser.py b/Autocoders/Python/src/fprime_ac/parsers/XmlComponentParser.py index 940c3b4936..5e45bfd2ae 100644 --- a/Autocoders/Python/src/fprime_ac/parsers/XmlComponentParser.py +++ b/Autocoders/Python/src/fprime_ac/parsers/XmlComponentParser.py @@ -16,24 +16,18 @@ # # Python standard modules # +import configparser import logging import os import sys -from lxml import etree, isoschematron - from fprime_ac.utils import ConfigManager -from fprime_ac.utils.buildroot import ( - BuildRootCollisionException, - BuildRootMissingException, - locate_build_root, -) -from fprime_ac.utils.exceptions import ( - FprimeRngXmlValidationException, - FprimeXmlException, -) - -import configparser +from fprime_ac.utils.buildroot import (BuildRootCollisionException, + BuildRootMissingException, + locate_build_root) +from fprime_ac.utils.exceptions import (FprimeRngXmlValidationException, + FprimeXmlException) +from lxml import etree, isoschematron # For Python determination diff --git a/Autocoders/Python/src/fprime_ac/parsers/XmlEnumParser.py b/Autocoders/Python/src/fprime_ac/parsers/XmlEnumParser.py index 88ea7c8b00..00896ac28f 100644 --- a/Autocoders/Python/src/fprime_ac/parsers/XmlEnumParser.py +++ b/Autocoders/Python/src/fprime_ac/parsers/XmlEnumParser.py @@ -20,14 +20,11 @@ import os import sys -from lxml import etree, isoschematron - from fprime_ac.parsers import XmlParser from fprime_ac.utils import ConfigManager -from fprime_ac.utils.exceptions import ( - FprimeRngXmlValidationException, - FprimeXmlException, -) +from fprime_ac.utils.exceptions import (FprimeRngXmlValidationException, + FprimeXmlException) +from lxml import etree, isoschematron # # Python extension modules and custom interfaces diff --git a/Autocoders/Python/src/fprime_ac/parsers/XmlPortsParser.py b/Autocoders/Python/src/fprime_ac/parsers/XmlPortsParser.py index 393a099c09..eb3ee111d0 100644 --- a/Autocoders/Python/src/fprime_ac/parsers/XmlPortsParser.py +++ b/Autocoders/Python/src/fprime_ac/parsers/XmlPortsParser.py @@ -20,10 +20,9 @@ import os import sys -from lxml import etree - from fprime_ac.utils import ConfigManager from fprime_ac.utils.exceptions import FprimeRngXmlValidationException +from lxml import etree # # Python extension modules and custom interfaces diff --git a/Autocoders/Python/src/fprime_ac/parsers/XmlSerializeParser.py b/Autocoders/Python/src/fprime_ac/parsers/XmlSerializeParser.py index e2faa87b89..67b0f88e30 100644 --- a/Autocoders/Python/src/fprime_ac/parsers/XmlSerializeParser.py +++ b/Autocoders/Python/src/fprime_ac/parsers/XmlSerializeParser.py @@ -21,15 +21,12 @@ import os import sys -from lxml import etree - from fprime_ac.utils import ConfigManager -from fprime_ac.utils.buildroot import ( - BuildRootCollisionException, - BuildRootMissingException, - locate_build_root, -) +from fprime_ac.utils.buildroot import (BuildRootCollisionException, + BuildRootMissingException, + locate_build_root) from fprime_ac.utils.exceptions import FprimeXmlException +from lxml import etree # # Python extension modules and custom interfaces diff --git a/Autocoders/Python/src/fprime_ac/parsers/XmlTopologyParser.py b/Autocoders/Python/src/fprime_ac/parsers/XmlTopologyParser.py index 3a7445b72a..b670651f1b 100644 --- a/Autocoders/Python/src/fprime_ac/parsers/XmlTopologyParser.py +++ b/Autocoders/Python/src/fprime_ac/parsers/XmlTopologyParser.py @@ -19,19 +19,14 @@ import logging import os -from lxml import etree, isoschematron - from fprime_ac.parsers import XmlComponentParser from fprime_ac.utils import ConfigManager -from fprime_ac.utils.buildroot import ( - BuildRootCollisionException, - BuildRootMissingException, - locate_build_root, -) -from fprime_ac.utils.exceptions import ( - FprimeRngXmlValidationException, - FprimeXmlException, -) +from fprime_ac.utils.buildroot import (BuildRootCollisionException, + BuildRootMissingException, + locate_build_root) +from fprime_ac.utils.exceptions import (FprimeRngXmlValidationException, + FprimeXmlException) +from lxml import etree, isoschematron # from builtins import file # diff --git a/Autocoders/Python/src/fprime_ac/utils/ArrayGenerator.py b/Autocoders/Python/src/fprime_ac/utils/ArrayGenerator.py index d2d219c86e..5751c64c31 100644 --- a/Autocoders/Python/src/fprime_ac/utils/ArrayGenerator.py +++ b/Autocoders/Python/src/fprime_ac/utils/ArrayGenerator.py @@ -12,12 +12,11 @@ # ALL RIGHTS RESERVED. U.S. Government Sponsorship acknowledged. # =============================================================================== -import sys import os -from fprime_ac.parsers import XmlParser -from fprime_ac.parsers import XmlArrayParser -from fprime_ac.generators.templates.arrays import array_cpp -from fprime_ac.generators.templates.arrays import array_hpp +import sys + +from fprime_ac.generators.templates.arrays import array_cpp, array_hpp +from fprime_ac.parsers import XmlArrayParser, XmlParser def open_file(name, type): diff --git a/Autocoders/Python/src/fprime_ac/utils/ConfigManager.py b/Autocoders/Python/src/fprime_ac/utils/ConfigManager.py index fd430fb9c6..40c6c0a673 100644 --- a/Autocoders/Python/src/fprime_ac/utils/ConfigManager.py +++ b/Autocoders/Python/src/fprime_ac/utils/ConfigManager.py @@ -20,8 +20,8 @@ # Copyright 2007, California Institute of Technology. # ALL RIGHTS RESERVED. U.S. Government Sponsorship acknowledged. # =============================================================================== -import os import configparser +import os parent = configparser.ConfigParser diff --git a/Autocoders/Python/src/fprime_ac/utils/EnumGenerator.py b/Autocoders/Python/src/fprime_ac/utils/EnumGenerator.py index ef6444073f..a00156456d 100644 --- a/Autocoders/Python/src/fprime_ac/utils/EnumGenerator.py +++ b/Autocoders/Python/src/fprime_ac/utils/EnumGenerator.py @@ -17,8 +17,7 @@ from fprime_ac.parsers import XmlEnumParser, XmlParser try: - from fprime_ac.generators.templates.enums import enum_cpp - from fprime_ac.generators.templates.enums import enum_hpp + from fprime_ac.generators.templates.enums import enum_cpp, enum_hpp except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/utils/ParseC.py b/Autocoders/Python/src/fprime_ac/utils/ParseC.py index e70f840e04..ca3c829f3e 100644 --- a/Autocoders/Python/src/fprime_ac/utils/ParseC.py +++ b/Autocoders/Python/src/fprime_ac/utils/ParseC.py @@ -10,17 +10,8 @@ import os -from .pyparsing import ( - Forward, - Literal, - Optional, - Word, - ZeroOrMore, - alphas, - cStyleComment, - nums, - restOfLine, -) +from .pyparsing import (Forward, Literal, Optional, Word, ZeroOrMore, alphas, + cStyleComment, nums, restOfLine) # Constants comma = Literal(",").suppress() diff --git a/Autocoders/Python/src/fprime_ac/utils/TopDictGenerator.py b/Autocoders/Python/src/fprime_ac/utils/TopDictGenerator.py index 3c6bb4ee23..16f8ca1b6b 100644 --- a/Autocoders/Python/src/fprime_ac/utils/TopDictGenerator.py +++ b/Autocoders/Python/src/fprime_ac/utils/TopDictGenerator.py @@ -1,16 +1,7 @@ -from lxml import etree - -from fprime_ac.parsers import ( - XmlArrayParser, - XmlEnumParser, - XmlSerializeParser, -) - -from fprime_ac.utils import ( - DictTypeConverter, -) - +from fprime_ac.parsers import XmlArrayParser, XmlEnumParser, XmlSerializeParser +from fprime_ac.utils import DictTypeConverter from fprime_ac.utils.buildroot import search_for_file +from lxml import etree class TopDictGenerator: diff --git a/Autocoders/Python/src/fprime_ac/utils/version.py b/Autocoders/Python/src/fprime_ac/utils/version.py index caf431de43..f22eecd10f 100644 --- a/Autocoders/Python/src/fprime_ac/utils/version.py +++ b/Autocoders/Python/src/fprime_ac/utils/version.py @@ -2,7 +2,6 @@ import os import subprocess - FALLBACK_VERSION = "v3.0.0" # Keep up-to-date on release tag diff --git a/Autocoders/Python/test/dictgen/test_dictgen.py b/Autocoders/Python/test/dictgen/test_dictgen.py index c0046d59c7..08719c9100 100644 --- a/Autocoders/Python/test/dictgen/test_dictgen.py +++ b/Autocoders/Python/test/dictgen/test_dictgen.py @@ -13,10 +13,9 @@ import time import pexpect -from pexpect import EOF, TIMEOUT - from fprime_ac.parsers import XmlTopologyParser from fprime_gds.common.loaders.xml_loader import XmlLoader +from pexpect import EOF, TIMEOUT sys.path.append(os.path.join(os.environ["BUILD_ROOT"], "Fw", "Python", "src")) sys.path.append(os.path.join(os.environ["BUILD_ROOT"], "Gds", "src")) # Add GDS modules diff --git a/RPI/test/int/rpi_integration_test.py b/RPI/test/int/rpi_integration_test.py index 97f37fb6ec..3f86c6d610 100644 --- a/RPI/test/int/rpi_integration_test.py +++ b/RPI/test/int/rpi_integration_test.py @@ -1,8 +1,8 @@ import os -import sys -import time import platform import subprocess +import sys +import time from enum import Enum from fprime_gds.common.pipeline.standard import StandardPipeline diff --git a/Ref/test/int/ref_integration_test.py b/Ref/test/int/ref_integration_test.py index 0c18e53634..0662473d7f 100644 --- a/Ref/test/int/ref_integration_test.py +++ b/Ref/test/int/ref_integration_test.py @@ -1,8 +1,8 @@ import os -import sys -import time import platform import subprocess +import sys +import time from enum import Enum filename = os.path.dirname(__file__) diff --git a/Utils/topologyTool.py b/Utils/topologyTool.py index d334ecfb9a..402f7ab7db 100644 --- a/Utils/topologyTool.py +++ b/Utils/topologyTool.py @@ -1,7 +1,8 @@ -from optparse import OptionParser import os.path -from lxml import etree import pickle +from optparse import OptionParser + +from lxml import etree """ This script is meant to serve as "sanity" checker for the MagicDraw generated topology XML files diff --git a/cmake/autocoder/ai-parser/ai_parser.py b/cmake/autocoder/ai-parser/ai_parser.py index 1231a3c734..badfbdd50b 100755 --- a/cmake/autocoder/ai-parser/ai_parser.py +++ b/cmake/autocoder/ai-parser/ai_parser.py @@ -8,6 +8,7 @@ @author mstarch """ from __future__ import print_function + import os import sys import xml.etree.ElementTree diff --git a/cmake/autocoder/fpp-locs-differ/fpp-locs-differ.py b/cmake/autocoder/fpp-locs-differ/fpp-locs-differ.py index c62d456c08..64984c4fb7 100644 --- a/cmake/autocoder/fpp-locs-differ/fpp-locs-differ.py +++ b/cmake/autocoder/fpp-locs-differ/fpp-locs-differ.py @@ -1,11 +1,9 @@ -import os -import sys import argparse import difflib -from fprime_ac.utils.buildroot import ( - build_root_relative_path, - set_build_roots, -) +import os +import sys + +from fprime_ac.utils.buildroot import build_root_relative_path, set_build_roots def main(): diff --git a/cmake/autocoder/fpp-wrapper/fpp-depend-parallelize.py b/cmake/autocoder/fpp-wrapper/fpp-depend-parallelize.py index 2b35da6af3..cc75b9e40d 100755 --- a/cmake/autocoder/fpp-wrapper/fpp-depend-parallelize.py +++ b/cmake/autocoder/fpp-wrapper/fpp-depend-parallelize.py @@ -1,8 +1,7 @@ -import os import multiprocessing +import os import subprocess import sys - from pathlib import Path diff --git a/cmake/docs/docs.py b/cmake/docs/docs.py index 0d95695951..4ddb561c0c 100755 --- a/cmake/docs/docs.py +++ b/cmake/docs/docs.py @@ -15,10 +15,10 @@ @author mstarch """ +import enum import os import re import sys -import enum LINE_RE = re.compile(r"^#{1,4} ?") diff --git a/cmake/target/version/generate_version_header.py b/cmake/target/version/generate_version_header.py index 4426201796..88011f4584 100755 --- a/cmake/target/version/generate_version_header.py +++ b/cmake/target/version/generate_version_header.py @@ -17,15 +17,12 @@ # ALL RIGHTS RESERVED. U.S. Government Sponsorship acknowledged. # =============================================================================== """ -import sys -import os import argparse +import os +import sys -from fprime_ac.utils.version import ( - get_fprime_version, - get_project_version, - FALLBACK_VERSION, -) +from fprime_ac.utils.version import (FALLBACK_VERSION, get_fprime_version, + get_project_version) def create_version_file(fid, framework_version, project_version): diff --git a/cmake/test/src/cmake.py b/cmake/test/src/cmake.py index af8d7b5470..ca5676ec25 100644 --- a/cmake/test/src/cmake.py +++ b/cmake/test/src/cmake.py @@ -7,11 +7,11 @@ @author mstarch """ -import sys -import shutil -import tempfile import select +import shutil import subprocess +import sys +import tempfile from pathlib import Path import pytest diff --git a/cmake/test/src/test_feature.py b/cmake/test/src/test_feature.py index 5d0ebe58fc..fb700f0c1e 100644 --- a/cmake/test/src/test_feature.py +++ b/cmake/test/src/test_feature.py @@ -6,9 +6,9 @@ #### import platform -import cmake import settings +import cmake _ = cmake.get_build( "FEATURE_BUILD", diff --git a/cmake/test/src/test_ref_shared.py b/cmake/test/src/test_ref_shared.py index 3de0130f45..ab7a8357d6 100644 --- a/cmake/test/src/test_ref_shared.py +++ b/cmake/test/src/test_ref_shared.py @@ -7,9 +7,10 @@ import platform import tempfile -import cmake import settings +import cmake + _ = cmake.get_build( "REF_BUILD", settings.REF_APP_PATH, diff --git a/cmake/test/src/test_unittests.py b/cmake/test/src/test_unittests.py index 60820eb329..c287447128 100644 --- a/cmake/test/src/test_unittests.py +++ b/cmake/test/src/test_unittests.py @@ -7,9 +7,10 @@ import platform import tempfile -import cmake import settings +import cmake + _ = cmake.get_build( "UT_BUILD", settings.REF_APP_PATH, diff --git a/docs/doxygen/gh_pages.py b/docs/doxygen/gh_pages.py index f9925fc3ef..ca86bc3159 100644 --- a/docs/doxygen/gh_pages.py +++ b/docs/doxygen/gh_pages.py @@ -3,15 +3,16 @@ Script to purge a directory of files starting with _ as this does not host well with GH pages and thus these files need to be rewritten. This file is designed for speed in these replacements. """ -from __future__ import print_function, division # To work with any system python +from __future__ import (division, # To work with any system python + print_function) import os import re import shutil import sys - from multiprocessing import Pool + def converter(input_data): """ Conversion function for thread pooling """ convert, changes = input_data From 847779c5f0d8d00f1cbacc0e778bcd92497126a8 Mon Sep 17 00:00:00 2001 From: sadra Date: Tue, 12 Apr 2022 03:32:46 +0430 Subject: [PATCH 3/3] black observed --- Autocoders/Python/bin/codegen.py | 22 ++++-- Autocoders/Python/bin/gds_dictgen.py | 1 + Autocoders/Python/bin/implgen.py | 13 +++- Autocoders/Python/bin/pymod_dictgen.py | 20 +++-- Autocoders/Python/bin/testgen.py | 26 +++++-- Autocoders/Python/bin/tlm_packet_gen.py | 17 ++++- .../src/fprime_ac/generators/GenFactory.py | 76 ++++++++++++++----- .../generators/visitors/AbstractVisitor.py | 6 +- .../generators/visitors/ChannelVisitor.py | 4 +- .../generators/visitors/CommandVisitor.py | 5 +- .../visitors/ComponentVisitorBase.py | 1 + .../generators/visitors/EventVisitor.py | 2 + .../visitors/InstanceChannelVisitor.py | 4 +- .../visitors/InstanceCommandVisitor.py | 5 +- .../visitors/InstanceEventVisitor.py | 2 + .../visitors/InstanceSerializableVisitor.py | 10 ++- .../InstanceTopologyChannelsHTMLVisitor.py | 2 + .../InstanceTopologyCmdHTMLVisitor.py | 2 + .../visitors/InstanceTopologyCppVisitor.py | 6 +- .../InstanceTopologyEventsHTMLVisitor.py | 2 + .../visitors/InstanceTopologyHVisitor.py | 6 +- .../generators/visitors/PortCppVisitor.py | 14 ++-- .../generators/visitors/PortHVisitor.py | 19 +++-- .../generators/visitors/SerialCppVisitor.py | 12 ++- .../generators/visitors/SerialHVisitor.py | 20 +++-- .../visitors/SerializableVisitor.py | 10 ++- .../generators/visitors/TopologyCppVisitor.py | 8 +- .../generators/visitors/TopologyHVisitor.py | 8 +- .../generators/visitors/TopologyIDVisitor.py | 2 + .../generators/writers/ComponentWriterBase.py | 7 +- .../generators/writers/InstChannelWriter.py | 4 +- .../generators/writers/InstCommandWriter.py | 5 +- .../generators/writers/InstEventWriter.py | 2 + .../src/fprime_ac/models/CompFactory.py | 13 +++- .../src/fprime_ac/models/TopoFactory.py | 8 +- .../src/fprime_ac/parsers/XmlArrayParser.py | 6 +- .../fprime_ac/parsers/XmlComponentParser.py | 14 ++-- .../src/fprime_ac/parsers/XmlEnumParser.py | 6 +- .../fprime_ac/parsers/XmlSerializeParser.py | 8 +- .../fprime_ac/parsers/XmlTopologyParser.py | 14 ++-- .../Python/src/fprime_ac/utils/ParseC.py | 13 +++- Utils/topologyTool.py | 4 +- .../target/version/generate_version_header.py | 7 +- 43 files changed, 306 insertions(+), 130 deletions(-) diff --git a/Autocoders/Python/bin/codegen.py b/Autocoders/Python/bin/codegen.py index 5ad2e568fd..137cf1198e 100755 --- a/Autocoders/Python/bin/codegen.py +++ b/Autocoders/Python/bin/codegen.py @@ -16,13 +16,23 @@ # Meta-model for Component only generation from fprime_ac.models import CompFactory, PortFactory, Serialize, TopoFactory + # Parsers to read the XML -from fprime_ac.parsers import (XmlComponentParser, XmlParser, XmlPortsParser, - XmlSerializeParser, XmlTopologyParser) -from fprime_ac.utils import (ArrayGenerator, ConfigManager, EnumGenerator, - Logger, TopDictGenerator) -from fprime_ac.utils.buildroot import (get_build_roots, search_for_file, - set_build_roots) +from fprime_ac.parsers import ( + XmlComponentParser, + XmlParser, + XmlPortsParser, + XmlSerializeParser, + XmlTopologyParser, +) +from fprime_ac.utils import ( + ArrayGenerator, + ConfigManager, + EnumGenerator, + Logger, + TopDictGenerator, +) +from fprime_ac.utils.buildroot import get_build_roots, search_for_file, set_build_roots from fprime_ac.utils.version import get_fprime_version, get_project_version from lxml import etree diff --git a/Autocoders/Python/bin/gds_dictgen.py b/Autocoders/Python/bin/gds_dictgen.py index 7b9e4ed6a4..ed028993fc 100755 --- a/Autocoders/Python/bin/gds_dictgen.py +++ b/Autocoders/Python/bin/gds_dictgen.py @@ -19,6 +19,7 @@ # Meta-model for Component only generation from fprime_ac.models import TopoFactory + # Parsers to read the XML from fprime_ac.parsers import XmlParser, XmlTopologyParser from fprime_ac.utils import ConfigManager, TopDictGenerator diff --git a/Autocoders/Python/bin/implgen.py b/Autocoders/Python/bin/implgen.py index 48e633d588..2b1d4d8ed3 100755 --- a/Autocoders/Python/bin/implgen.py +++ b/Autocoders/Python/bin/implgen.py @@ -18,14 +18,19 @@ from optparse import OptionParser from fprime_ac.generators.writers import ImplCppWriter, ImplHWriter + # Meta-model for Component only generation from fprime_ac.models import CompFactory + # Parsers to read the XML -from fprime_ac.parsers import (XmlComponentParser, XmlParser, XmlPortsParser, - XmlSerializeParser) +from fprime_ac.parsers import ( + XmlComponentParser, + XmlParser, + XmlPortsParser, + XmlSerializeParser, +) from fprime_ac.utils import ConfigManager, Logger -from fprime_ac.utils.buildroot import (get_build_roots, search_for_file, - set_build_roots) +from fprime_ac.utils.buildroot import get_build_roots, search_for_file, set_build_roots from utils.pathmaker import setup_fprime_autocoder_path setup_fprime_autocoder_path() diff --git a/Autocoders/Python/bin/pymod_dictgen.py b/Autocoders/Python/bin/pymod_dictgen.py index ae0bb282c6..4817631f48 100755 --- a/Autocoders/Python/bin/pymod_dictgen.py +++ b/Autocoders/Python/bin/pymod_dictgen.py @@ -17,16 +17,24 @@ import sys from optparse import OptionParser -from fprime_ac.generators.writers import (InstChannelWriter, InstCommandWriter, - InstEventWriter) +from fprime_ac.generators.writers import ( + InstChannelWriter, + InstCommandWriter, + InstEventWriter, +) + # Meta-model for Component only generation from fprime_ac.models import CompFactory, ModelParser, TopoFactory + # Parsers to read the XML -from fprime_ac.parsers import (XmlParser, XmlPortsParser, XmlSerializeParser, - XmlTopologyParser) +from fprime_ac.parsers import ( + XmlParser, + XmlPortsParser, + XmlSerializeParser, + XmlTopologyParser, +) from fprime_ac.utils import ConfigManager -from fprime_ac.utils.buildroot import (get_build_roots, search_for_file, - set_build_roots) +from fprime_ac.utils.buildroot import get_build_roots, search_for_file, set_build_roots # Generators to produce the code try: diff --git a/Autocoders/Python/bin/testgen.py b/Autocoders/Python/bin/testgen.py index 577dc6470d..eaf9faf1ed 100755 --- a/Autocoders/Python/bin/testgen.py +++ b/Autocoders/Python/bin/testgen.py @@ -19,18 +19,28 @@ import time from optparse import OptionParser -from fprime_ac.generators.writers import (ComponentTestCppWriter, - ComponentTestHWriter, GTestCppWriter, - GTestHWriter, TestImplCppWriter, - TestImplHWriter, TestMainWriter) +from fprime_ac.generators.writers import ( + ComponentTestCppWriter, + ComponentTestHWriter, + GTestCppWriter, + GTestHWriter, + TestImplCppWriter, + TestImplHWriter, + TestMainWriter, +) + # Meta-model for Component only generation from fprime_ac.models import CompFactory + # Parsers to read the XML -from fprime_ac.parsers import (XmlComponentParser, XmlParser, XmlPortsParser, - XmlSerializeParser) +from fprime_ac.parsers import ( + XmlComponentParser, + XmlParser, + XmlPortsParser, + XmlSerializeParser, +) from fprime_ac.utils import ConfigManager -from fprime_ac.utils.buildroot import (get_build_roots, search_for_file, - set_build_roots) +from fprime_ac.utils.buildroot import get_build_roots, search_for_file, set_build_roots # Generators to produce the code try: diff --git a/Autocoders/Python/bin/tlm_packet_gen.py b/Autocoders/Python/bin/tlm_packet_gen.py index 39e70cb810..d5b4294b24 100755 --- a/Autocoders/Python/bin/tlm_packet_gen.py +++ b/Autocoders/Python/bin/tlm_packet_gen.py @@ -19,13 +19,22 @@ from optparse import OptionParser from Cheetah.Template import Template + # Meta-model for Component only generation from fprime_ac.models import TopoFactory + # Parsers to read the XML -from fprime_ac.parsers import (XmlArrayParser, XmlEnumParser, - XmlSerializeParser, XmlTopologyParser) -from fprime_ac.utils.buildroot import (get_nearest_build_root, search_for_file, - set_build_roots) +from fprime_ac.parsers import ( + XmlArrayParser, + XmlEnumParser, + XmlSerializeParser, + XmlTopologyParser, +) +from fprime_ac.utils.buildroot import ( + get_nearest_build_root, + search_for_file, + set_build_roots, +) from lxml import etree header_file_template = """ diff --git a/Autocoders/Python/src/fprime_ac/generators/GenFactory.py b/Autocoders/Python/src/fprime_ac/generators/GenFactory.py index 2ad9e39bb9..dee060e736 100644 --- a/Autocoders/Python/src/fprime_ac/generators/GenFactory.py +++ b/Autocoders/Python/src/fprime_ac/generators/GenFactory.py @@ -21,27 +21,61 @@ from fprime_ac.utils import Logger -from . import (DictBody, DictHeader, DictStart, FinishSource, HtmlDocPage, - HtmlStartPage, Includes1, Includes2, InitFiles, - InstanceDictBody, InstanceDictHeader, InstanceDictStart, - MdDocPage, MdStartPage, Namespace, Private, Protected, Public, - StartSource) -from .visitors import (ChannelVisitor, CommandVisitor, ComponentCppVisitor, - ComponentHVisitor, ComponentTestCppVisitor, - ComponentTestHVisitor, EventVisitor, GTestCppVisitor, - GTestHVisitor, HtmlDocVisitor, ImplCppVisitor, - ImplHVisitor, InstanceChannelVisitor, - InstanceCommandVisitor, InstanceEventVisitor, - InstanceSerializableVisitor, - InstanceTopologyChannelsHTMLVisitor, - InstanceTopologyCmdHTMLVisitor, - InstanceTopologyCppVisitor, - InstanceTopologyEventsHTMLVisitor, - InstanceTopologyHVisitor, MdDocVisitor, PortCppVisitor, - PortHVisitor, SerialCppVisitor, SerialHVisitor, - SerializableVisitor, TestImplCppVisitor, - TestImplHVisitor, TopologyCppVisitor, TopologyHVisitor, - TopologyIDVisitor) +from . import ( + DictBody, + DictHeader, + DictStart, + FinishSource, + HtmlDocPage, + HtmlStartPage, + Includes1, + Includes2, + InitFiles, + InstanceDictBody, + InstanceDictHeader, + InstanceDictStart, + MdDocPage, + MdStartPage, + Namespace, + Private, + Protected, + Public, + StartSource, +) +from .visitors import ( + ChannelVisitor, + CommandVisitor, + ComponentCppVisitor, + ComponentHVisitor, + ComponentTestCppVisitor, + ComponentTestHVisitor, + EventVisitor, + GTestCppVisitor, + GTestHVisitor, + HtmlDocVisitor, + ImplCppVisitor, + ImplHVisitor, + InstanceChannelVisitor, + InstanceCommandVisitor, + InstanceEventVisitor, + InstanceSerializableVisitor, + InstanceTopologyChannelsHTMLVisitor, + InstanceTopologyCmdHTMLVisitor, + InstanceTopologyCppVisitor, + InstanceTopologyEventsHTMLVisitor, + InstanceTopologyHVisitor, + MdDocVisitor, + PortCppVisitor, + PortHVisitor, + SerialCppVisitor, + SerialHVisitor, + SerializableVisitor, + TestImplCppVisitor, + TestImplHVisitor, + TopologyCppVisitor, + TopologyHVisitor, + TopologyIDVisitor, +) # Global logger init. below. PRINT = logging.getLogger("output") diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/AbstractVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/AbstractVisitor.py index d2760bf8a9..f08f692280 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/AbstractVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/AbstractVisitor.py @@ -17,8 +17,10 @@ import os import sys -from fprime_ac.utils.buildroot import (BuildRootMissingException, - build_root_relative_path) +from fprime_ac.utils.buildroot import ( + BuildRootMissingException, + build_root_relative_path, +) # # Python extension modules and custom interfaces diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/ChannelVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/ChannelVisitor.py index 2edd79bf06..1398e4261b 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/ChannelVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/ChannelVisitor.py @@ -22,6 +22,7 @@ from fprime_ac.generators import formatters from fprime_ac.generators.visitors import AbstractVisitor + # from fprime_ac.utils import DiffAndRename # # Python extension modules and custom interfaces @@ -34,8 +35,7 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.channels import (ChannelBody, - ChannelHeader) + from fprime_ac.generators.templates.channels import ChannelBody, ChannelHeader except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/CommandVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/CommandVisitor.py index f2c849b9ae..018c653ba1 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/CommandVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/CommandVisitor.py @@ -21,9 +21,11 @@ from getpass import getuser from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import Command, Parameter + # # Python extension modules and custom interfaces # @@ -35,8 +37,7 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.commands import (CommandBody, - CommandHeader) + from fprime_ac.generators.templates.commands import CommandBody, CommandHeader except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/ComponentVisitorBase.py b/Autocoders/Python/src/fprime_ac/generators/visitors/ComponentVisitorBase.py index 188ea8584d..696197fdf6 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/ComponentVisitorBase.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/ComponentVisitorBase.py @@ -23,6 +23,7 @@ from fprime_ac.generators import formatters from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser + # # Python extension modules and custom interfaces # diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/EventVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/EventVisitor.py index a41080a4d6..6c6bee8844 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/EventVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/EventVisitor.py @@ -21,8 +21,10 @@ from getpass import getuser from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor + # # Python extension modules and custom interfaces # diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceChannelVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceChannelVisitor.py index 02d6184c06..edd488017f 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceChannelVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceChannelVisitor.py @@ -22,6 +22,7 @@ from fprime_ac.generators import formatters from fprime_ac.generators.visitors import AbstractVisitor + # from fprime_ac.utils import DiffAndRename # # Python extension modules and custom interfaces @@ -34,8 +35,7 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.channels import (ChannelBody, - ChannelHeader) + from fprime_ac.generators.templates.channels import ChannelBody, ChannelHeader except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceCommandVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceCommandVisitor.py index ac29754e3c..1b26e744a5 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceCommandVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceCommandVisitor.py @@ -21,9 +21,11 @@ from getpass import getuser from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import Command, Parameter + # # Python extension modules and custom interfaces # @@ -35,8 +37,7 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.commands import (CommandBody, - CommandHeader) + from fprime_ac.generators.templates.commands import CommandBody, CommandHeader except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceEventVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceEventVisitor.py index fb334ce0e7..765573ad66 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceEventVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceEventVisitor.py @@ -21,8 +21,10 @@ from getpass import getuser from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor + # # Python extension modules and custom interfaces # diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceSerializableVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceSerializableVisitor.py index 2cf7ea904e..46650a3a23 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceSerializableVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceSerializableVisitor.py @@ -21,8 +21,10 @@ from getpass import getuser from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor + # # Python extension modules and custom interfaces # @@ -34,9 +36,11 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.serialize import (SerialBody, - SerialHeader, - SerialImport) + from fprime_ac.generators.templates.serialize import ( + SerialBody, + SerialHeader, + SerialImport, + ) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyChannelsHTMLVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyChannelsHTMLVisitor.py index 650ed7da10..d1e1b03396 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyChannelsHTMLVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyChannelsHTMLVisitor.py @@ -19,9 +19,11 @@ import sys from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser + # # Python extension modules and custom interfaces # diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyCmdHTMLVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyCmdHTMLVisitor.py index a4d0afc447..f9ea7932af 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyCmdHTMLVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyCmdHTMLVisitor.py @@ -19,9 +19,11 @@ import sys from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser + # # Python extension modules and custom interfaces # diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyCppVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyCppVisitor.py index 212633ec27..56fead0266 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyCppVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyCppVisitor.py @@ -18,9 +18,11 @@ import sys from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser + # # Python extension modules and custom interfaces # @@ -33,7 +35,9 @@ # try: from fprime_ac.generators.templates.topology import ( - includes1TopologyCpp, publicInstanceTopologyCpp) + includes1TopologyCpp, + publicInstanceTopologyCpp, + ) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyEventsHTMLVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyEventsHTMLVisitor.py index ff64e6c84d..d29a932c48 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyEventsHTMLVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyEventsHTMLVisitor.py @@ -19,9 +19,11 @@ import sys from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser + # # Python extension modules and custom interfaces # diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyHVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyHVisitor.py index 535e56dd12..e600788a35 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyHVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyHVisitor.py @@ -18,9 +18,11 @@ import sys from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser + # # Python extension modules and custom interfaces # @@ -33,7 +35,9 @@ # try: from fprime_ac.generators.templates.topology import ( - includes1TopologyH, publicInstanceTopologyH) + includes1TopologyH, + publicInstanceTopologyH, + ) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/PortCppVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/PortCppVisitor.py index 39146e3cd2..55e6edcc76 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/PortCppVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/PortCppVisitor.py @@ -18,8 +18,10 @@ import sys from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor + # # Python extension modules and custom interfaces # @@ -31,11 +33,13 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.port import (finishPortCpp, - includes1PortCpp, - namespacePortCpp, - privatePortCpp, - publicPortCpp) + from fprime_ac.generators.templates.port import ( + finishPortCpp, + includes1PortCpp, + namespacePortCpp, + privatePortCpp, + publicPortCpp, + ) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/PortHVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/PortHVisitor.py index 83c66f50c9..1be3e8cb0b 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/PortHVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/PortHVisitor.py @@ -20,8 +20,10 @@ from getpass import getuser from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor + # # Python extension modules and custom interfaces # @@ -33,13 +35,16 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.port import (finishPortH, - includes1PortH, - includes2PortH, - namespacePortH, - privatePortH, - protectedPortH, - publicPortH, startPortH) + from fprime_ac.generators.templates.port import ( + finishPortH, + includes1PortH, + includes2PortH, + namespacePortH, + privatePortH, + protectedPortH, + publicPortH, + startPortH, + ) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/SerialCppVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/SerialCppVisitor.py index 8dec8741eb..77eb8a7f79 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/SerialCppVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/SerialCppVisitor.py @@ -18,8 +18,10 @@ import sys from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor + # # Python extension modules and custom interfaces # @@ -32,10 +34,12 @@ # try: # from fprime_ac.generators.templates import privateSerialCpp - from fprime_ac.generators.templates.serialize import (finishSerialCpp, - includes1SerialCpp, - namespaceSerialCpp, - publicSerialCpp) + from fprime_ac.generators.templates.serialize import ( + finishSerialCpp, + includes1SerialCpp, + namespaceSerialCpp, + publicSerialCpp, + ) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/SerialHVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/SerialHVisitor.py index a7d0e3f65d..8cd7cb7846 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/SerialHVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/SerialHVisitor.py @@ -20,8 +20,10 @@ from getpass import getuser from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor + # # Python extension modules and custom interfaces # @@ -33,14 +35,16 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.serialize import (finishSerialH, - includes1SerialH, - includes2SerialH, - namespaceSerialH, - privateSerialH, - protectedSerialH, - publicSerialH, - startSerialH) + from fprime_ac.generators.templates.serialize import ( + finishSerialH, + includes1SerialH, + includes2SerialH, + namespaceSerialH, + privateSerialH, + protectedSerialH, + publicSerialH, + startSerialH, + ) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/SerializableVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/SerializableVisitor.py index 29a272deb3..4b6d2584c9 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/SerializableVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/SerializableVisitor.py @@ -21,8 +21,10 @@ from getpass import getuser from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor + # # Python extension modules and custom interfaces # @@ -34,9 +36,11 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.serialize import (SerialBody, - SerialHeader, - SerialImport) + from fprime_ac.generators.templates.serialize import ( + SerialBody, + SerialHeader, + SerialImport, + ) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyCppVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyCppVisitor.py index ed6fb046f3..08040a761c 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyCppVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyCppVisitor.py @@ -18,9 +18,11 @@ import sys from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser + # # Python extension modules and custom interfaces # @@ -32,8 +34,10 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.topology import (includes1TopologyCpp, - publicTopologyCpp) + from fprime_ac.generators.templates.topology import ( + includes1TopologyCpp, + publicTopologyCpp, + ) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyHVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyHVisitor.py index 1a814c6dd2..ba1f5f9335 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyHVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyHVisitor.py @@ -18,9 +18,11 @@ import sys from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser + # # Python extension modules and custom interfaces # @@ -32,8 +34,10 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.topology import (includes1TopologyH, - publicTopologyH) + from fprime_ac.generators.templates.topology import ( + includes1TopologyH, + publicTopologyH, + ) except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyIDVisitor.py b/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyIDVisitor.py index b222502a6a..31e4d4420a 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyIDVisitor.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/TopologyIDVisitor.py @@ -18,9 +18,11 @@ import sys from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.visitors import AbstractVisitor from fprime_ac.models import ModelParser + # # Python extension modules and custom interfaces # diff --git a/Autocoders/Python/src/fprime_ac/generators/writers/ComponentWriterBase.py b/Autocoders/Python/src/fprime_ac/generators/writers/ComponentWriterBase.py index 04d771e293..dd01a621b7 100644 --- a/Autocoders/Python/src/fprime_ac/generators/writers/ComponentWriterBase.py +++ b/Autocoders/Python/src/fprime_ac/generators/writers/ComponentWriterBase.py @@ -24,12 +24,15 @@ from fprime_ac.generators import formatters from fprime_ac.generators.writers import AbstractWriter from fprime_ac.models import ModelParser + # # Python extension modules and custom interfaces # from fprime_ac.utils import ConfigManager -from fprime_ac.utils.buildroot import (BuildRootMissingException, - build_root_relative_path) +from fprime_ac.utils.buildroot import ( + BuildRootMissingException, + build_root_relative_path, +) # # Global logger init. below. diff --git a/Autocoders/Python/src/fprime_ac/generators/writers/InstChannelWriter.py b/Autocoders/Python/src/fprime_ac/generators/writers/InstChannelWriter.py index 78baa679a3..edd48adebe 100644 --- a/Autocoders/Python/src/fprime_ac/generators/writers/InstChannelWriter.py +++ b/Autocoders/Python/src/fprime_ac/generators/writers/InstChannelWriter.py @@ -22,6 +22,7 @@ from fprime_ac.generators import formatters from fprime_ac.generators.writers import AbstractDictWriter + # from fprime_ac.utils import DiffAndRename # # Python extension modules and custom interfaces @@ -34,8 +35,7 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.channels import (ChannelBody, - ChannelHeader) + from fprime_ac.generators.templates.channels import ChannelBody, ChannelHeader except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/writers/InstCommandWriter.py b/Autocoders/Python/src/fprime_ac/generators/writers/InstCommandWriter.py index 4dc7bb316d..c5710c9379 100644 --- a/Autocoders/Python/src/fprime_ac/generators/writers/InstCommandWriter.py +++ b/Autocoders/Python/src/fprime_ac/generators/writers/InstCommandWriter.py @@ -21,9 +21,11 @@ from getpass import getuser from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.writers import AbstractDictWriter from fprime_ac.models import Command, Parameter + # # Python extension modules and custom interfaces # @@ -35,8 +37,7 @@ # Import precompiled templates here # try: - from fprime_ac.generators.templates.commands import (CommandBody, - CommandHeader) + from fprime_ac.generators.templates.commands import CommandBody, CommandHeader except ImportError: print("ERROR: must generate python templates first.") sys.exit(-1) diff --git a/Autocoders/Python/src/fprime_ac/generators/writers/InstEventWriter.py b/Autocoders/Python/src/fprime_ac/generators/writers/InstEventWriter.py index 75a463235b..9532d32379 100644 --- a/Autocoders/Python/src/fprime_ac/generators/writers/InstEventWriter.py +++ b/Autocoders/Python/src/fprime_ac/generators/writers/InstEventWriter.py @@ -21,8 +21,10 @@ from getpass import getuser from fprime_ac.generators import formatters + # from fprime_ac.utils import DiffAndRename from fprime_ac.generators.writers import AbstractDictWriter + # # Python extension modules and custom interfaces # diff --git a/Autocoders/Python/src/fprime_ac/models/CompFactory.py b/Autocoders/Python/src/fprime_ac/models/CompFactory.py index 587c1aa538..5ab0e359ee 100644 --- a/Autocoders/Python/src/fprime_ac/models/CompFactory.py +++ b/Autocoders/Python/src/fprime_ac/models/CompFactory.py @@ -19,8 +19,17 @@ import logging import sys -from fprime_ac.models import (Arg, Channel, Command, Component, Event, - InternalInterface, Parameter, Port, Serialize) +from fprime_ac.models import ( + Arg, + Channel, + Command, + Component, + Event, + InternalInterface, + Parameter, + Port, + Serialize, +) # Global logger init. below. PRINT = logging.getLogger("output") diff --git a/Autocoders/Python/src/fprime_ac/models/TopoFactory.py b/Autocoders/Python/src/fprime_ac/models/TopoFactory.py index 93d1ad4cd9..82a92f185e 100644 --- a/Autocoders/Python/src/fprime_ac/models/TopoFactory.py +++ b/Autocoders/Python/src/fprime_ac/models/TopoFactory.py @@ -22,9 +22,11 @@ from fprime_ac.models import Component, Port, Topology from fprime_ac.parsers import XmlComponentParser from fprime_ac.utils import ConfigManager -from fprime_ac.utils.buildroot import (BuildRootCollisionException, - BuildRootMissingException, - locate_build_root) +from fprime_ac.utils.buildroot import ( + BuildRootCollisionException, + BuildRootMissingException, + locate_build_root, +) # from builtins import True # from Canvas import Window diff --git a/Autocoders/Python/src/fprime_ac/parsers/XmlArrayParser.py b/Autocoders/Python/src/fprime_ac/parsers/XmlArrayParser.py index 3c19c751e4..4bf2820e1b 100644 --- a/Autocoders/Python/src/fprime_ac/parsers/XmlArrayParser.py +++ b/Autocoders/Python/src/fprime_ac/parsers/XmlArrayParser.py @@ -23,8 +23,10 @@ from fprime_ac.parsers import XmlParser from fprime_ac.utils import ConfigManager -from fprime_ac.utils.exceptions import (FprimeRngXmlValidationException, - FprimeXmlException) +from fprime_ac.utils.exceptions import ( + FprimeRngXmlValidationException, + FprimeXmlException, +) from lxml import etree, isoschematron # diff --git a/Autocoders/Python/src/fprime_ac/parsers/XmlComponentParser.py b/Autocoders/Python/src/fprime_ac/parsers/XmlComponentParser.py index 5e45bfd2ae..5a4a05c2a3 100644 --- a/Autocoders/Python/src/fprime_ac/parsers/XmlComponentParser.py +++ b/Autocoders/Python/src/fprime_ac/parsers/XmlComponentParser.py @@ -22,11 +22,15 @@ import sys from fprime_ac.utils import ConfigManager -from fprime_ac.utils.buildroot import (BuildRootCollisionException, - BuildRootMissingException, - locate_build_root) -from fprime_ac.utils.exceptions import (FprimeRngXmlValidationException, - FprimeXmlException) +from fprime_ac.utils.buildroot import ( + BuildRootCollisionException, + BuildRootMissingException, + locate_build_root, +) +from fprime_ac.utils.exceptions import ( + FprimeRngXmlValidationException, + FprimeXmlException, +) from lxml import etree, isoschematron # For Python determination diff --git a/Autocoders/Python/src/fprime_ac/parsers/XmlEnumParser.py b/Autocoders/Python/src/fprime_ac/parsers/XmlEnumParser.py index 00896ac28f..dd4efbdd84 100644 --- a/Autocoders/Python/src/fprime_ac/parsers/XmlEnumParser.py +++ b/Autocoders/Python/src/fprime_ac/parsers/XmlEnumParser.py @@ -22,8 +22,10 @@ from fprime_ac.parsers import XmlParser from fprime_ac.utils import ConfigManager -from fprime_ac.utils.exceptions import (FprimeRngXmlValidationException, - FprimeXmlException) +from fprime_ac.utils.exceptions import ( + FprimeRngXmlValidationException, + FprimeXmlException, +) from lxml import etree, isoschematron # diff --git a/Autocoders/Python/src/fprime_ac/parsers/XmlSerializeParser.py b/Autocoders/Python/src/fprime_ac/parsers/XmlSerializeParser.py index 67b0f88e30..0127f9081e 100644 --- a/Autocoders/Python/src/fprime_ac/parsers/XmlSerializeParser.py +++ b/Autocoders/Python/src/fprime_ac/parsers/XmlSerializeParser.py @@ -22,9 +22,11 @@ import sys from fprime_ac.utils import ConfigManager -from fprime_ac.utils.buildroot import (BuildRootCollisionException, - BuildRootMissingException, - locate_build_root) +from fprime_ac.utils.buildroot import ( + BuildRootCollisionException, + BuildRootMissingException, + locate_build_root, +) from fprime_ac.utils.exceptions import FprimeXmlException from lxml import etree diff --git a/Autocoders/Python/src/fprime_ac/parsers/XmlTopologyParser.py b/Autocoders/Python/src/fprime_ac/parsers/XmlTopologyParser.py index b670651f1b..14cd70feb1 100644 --- a/Autocoders/Python/src/fprime_ac/parsers/XmlTopologyParser.py +++ b/Autocoders/Python/src/fprime_ac/parsers/XmlTopologyParser.py @@ -21,11 +21,15 @@ from fprime_ac.parsers import XmlComponentParser from fprime_ac.utils import ConfigManager -from fprime_ac.utils.buildroot import (BuildRootCollisionException, - BuildRootMissingException, - locate_build_root) -from fprime_ac.utils.exceptions import (FprimeRngXmlValidationException, - FprimeXmlException) +from fprime_ac.utils.buildroot import ( + BuildRootCollisionException, + BuildRootMissingException, + locate_build_root, +) +from fprime_ac.utils.exceptions import ( + FprimeRngXmlValidationException, + FprimeXmlException, +) from lxml import etree, isoschematron # from builtins import file diff --git a/Autocoders/Python/src/fprime_ac/utils/ParseC.py b/Autocoders/Python/src/fprime_ac/utils/ParseC.py index ca3c829f3e..e70f840e04 100644 --- a/Autocoders/Python/src/fprime_ac/utils/ParseC.py +++ b/Autocoders/Python/src/fprime_ac/utils/ParseC.py @@ -10,8 +10,17 @@ import os -from .pyparsing import (Forward, Literal, Optional, Word, ZeroOrMore, alphas, - cStyleComment, nums, restOfLine) +from .pyparsing import ( + Forward, + Literal, + Optional, + Word, + ZeroOrMore, + alphas, + cStyleComment, + nums, + restOfLine, +) # Constants comma = Literal(",").suppress() diff --git a/Utils/topologyTool.py b/Utils/topologyTool.py index 402f7ab7db..b3d4571d1a 100644 --- a/Utils/topologyTool.py +++ b/Utils/topologyTool.py @@ -85,9 +85,7 @@ def tag_object_to_string(tag_obj): if type(internal_item) == str: out += internal_item else: - out += "\n\t" + tag_object_to_string(internal_item).replace( - "\n", "\n\t" - ) + out += "\n\t" + tag_object_to_string(internal_item).replace("\n", "\n\t") final_line_break = "\n" out += final_line_break + "" diff --git a/cmake/target/version/generate_version_header.py b/cmake/target/version/generate_version_header.py index 88011f4584..9ed5bafe1c 100755 --- a/cmake/target/version/generate_version_header.py +++ b/cmake/target/version/generate_version_header.py @@ -21,8 +21,11 @@ import os import sys -from fprime_ac.utils.version import (FALLBACK_VERSION, get_fprime_version, - get_project_version) +from fprime_ac.utils.version import ( + FALLBACK_VERSION, + get_fprime_version, + get_project_version, +) def create_version_file(fid, framework_version, project_version):