diff --git a/pb_plugins/protoc_gen_mavsdk/__init__.py b/pb_plugins/protoc_gen_mavsdk/__init__.py index 963fed869..a670f10a9 100644 --- a/pb_plugins/protoc_gen_mavsdk/__init__.py +++ b/pb_plugins/protoc_gen_mavsdk/__init__.py @@ -2,4 +2,4 @@ """ Autogenerator for MAVSDK """ -from .autogen import AutoGen +from protoc_gen_mavsdk.autogen import AutoGen diff --git a/pb_plugins/protoc_gen_mavsdk/__main__.py b/pb_plugins/protoc_gen_mavsdk/__main__.py index a8789358e..04a2d1158 100644 --- a/pb_plugins/protoc_gen_mavsdk/__main__.py +++ b/pb_plugins/protoc_gen_mavsdk/__main__.py @@ -3,7 +3,7 @@ import sys from google.protobuf.compiler import plugin_pb2 -from . import AutoGen +from protoc_gen_mavsdk.autogen import AutoGen def main(): diff --git a/pb_plugins/protoc_gen_mavsdk/autogen.py b/pb_plugins/protoc_gen_mavsdk/autogen.py index f817afb4d..362e0e8c2 100644 --- a/pb_plugins/protoc_gen_mavsdk/autogen.py +++ b/pb_plugins/protoc_gen_mavsdk/autogen.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- from os import environ from google.protobuf.compiler import plugin_pb2 -from .autogen_file import File -from .docs import Docs -from .enum import Enum -from .methods import Method -from .struct import Struct -from .utils import (get_template_env, +from protoc_gen_mavsdk.autogen_file import File +from protoc_gen_mavsdk.docs import Docs +from protoc_gen_mavsdk.pb_enum import Enum +from protoc_gen_mavsdk.methods import Method +from protoc_gen_mavsdk.pb_struct import Struct +from protoc_gen_mavsdk.utils import (get_template_env, has_result, is_server, name_parser_factory, diff --git a/pb_plugins/protoc_gen_mavsdk/autogen_file.py b/pb_plugins/protoc_gen_mavsdk/autogen_file.py index a612c90d0..387079bc7 100644 --- a/pb_plugins/protoc_gen_mavsdk/autogen_file.py +++ b/pb_plugins/protoc_gen_mavsdk/autogen_file.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .utils import name_parser_factory +from protoc_gen_mavsdk.utils import name_parser_factory class File(object): diff --git a/pb_plugins/protoc_gen_mavsdk/docs.py b/pb_plugins/protoc_gen_mavsdk/docs.py index bddb25408..f9870e991 100644 --- a/pb_plugins/protoc_gen_mavsdk/docs.py +++ b/pb_plugins/protoc_gen_mavsdk/docs.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- - - class Docs: """ Docs diff --git a/pb_plugins/protoc_gen_mavsdk/mavsdk_options_pb2.py b/pb_plugins/protoc_gen_mavsdk/mavsdk_options_pb2.py index 597369054..15b479a27 100644 --- a/pb_plugins/protoc_gen_mavsdk/mavsdk_options_pb2.py +++ b/pb_plugins/protoc_gen_mavsdk/mavsdk_options_pb2.py @@ -4,8 +4,6 @@ from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) diff --git a/pb_plugins/protoc_gen_mavsdk/methods.py b/pb_plugins/protoc_gen_mavsdk/methods.py index 85a14a548..fad9972b0 100644 --- a/pb_plugins/protoc_gen_mavsdk/methods.py +++ b/pb_plugins/protoc_gen_mavsdk/methods.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- -from .utils import (filter_out_result, - is_stream, - name_parser_factory, - no_return, - Param, - remove_subscribe, - type_info_factory) +from protoc_gen_mavsdk.utils import (filter_out_result, + is_stream, + name_parser_factory, + no_return, + Param, + remove_subscribe, + type_info_factory) class Method(object): diff --git a/pb_plugins/protoc_gen_mavsdk/name_parser.py b/pb_plugins/protoc_gen_mavsdk/name_parser.py index 47c4d57df..e81ff16de 100644 --- a/pb_plugins/protoc_gen_mavsdk/name_parser.py +++ b/pb_plugins/protoc_gen_mavsdk/name_parser.py @@ -1,8 +1,6 @@ import json import re -from os import environ - class NameParserFactory: _initialisms = [] diff --git a/pb_plugins/protoc_gen_mavsdk/enum.py b/pb_plugins/protoc_gen_mavsdk/pb_enum.py similarity index 98% rename from pb_plugins/protoc_gen_mavsdk/enum.py rename to pb_plugins/protoc_gen_mavsdk/pb_enum.py index b8c6683b7..525be94f4 100644 --- a/pb_plugins/protoc_gen_mavsdk/enum.py +++ b/pb_plugins/protoc_gen_mavsdk/pb_enum.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .utils import name_parser_factory +from protoc_gen_mavsdk.utils import name_parser_factory class Enum(object): diff --git a/pb_plugins/protoc_gen_mavsdk/struct.py b/pb_plugins/protoc_gen_mavsdk/pb_struct.py similarity index 91% rename from pb_plugins/protoc_gen_mavsdk/struct.py rename to pb_plugins/protoc_gen_mavsdk/pb_struct.py index 8f6bdefac..99a924caf 100644 --- a/pb_plugins/protoc_gen_mavsdk/struct.py +++ b/pb_plugins/protoc_gen_mavsdk/pb_struct.py @@ -1,13 +1,11 @@ # -*- coding: utf-8 -*- - - -from .enum import Enum -from .utils import (is_request, - is_response, - is_struct, - name_parser_factory, - Param, - type_info_factory) +from protoc_gen_mavsdk.pb_enum import Enum +from protoc_gen_mavsdk.utils import (is_request, + is_response, + is_struct, + name_parser_factory, + Param, + type_info_factory) class Struct(object): diff --git a/pb_plugins/protoc_gen_mavsdk/utils.py b/pb_plugins/protoc_gen_mavsdk/utils.py index 6492d8260..0f1c0ab06 100644 --- a/pb_plugins/protoc_gen_mavsdk/utils.py +++ b/pb_plugins/protoc_gen_mavsdk/utils.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from jinja2 import Environment, FileSystemLoader -from .name_parser import NameParserFactory -from .type_info import TypeInfoFactory +from protoc_gen_mavsdk.name_parser import NameParserFactory +from protoc_gen_mavsdk.type_info import TypeInfoFactory name_parser_factory = NameParserFactory()