osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/python/pyosmocom/+/41384?usp=email )


Change subject: Fix lint errors: don't use star imports
......................................................................

Fix lint errors: don't use star imports

tests/test_tlv.py:21:1: F403 `from osmocom.tlv import *` used; unable to detect 
undefined names
   |
19 | import unittest
20 | from construct import Int8ub, GreedyBytes
21 | from osmocom.tlv import *
   | ^^^^^^^^^^^^^^^^^^^^^^^^^ F403
22 | from osmocom.utils import h2b

Change-Id: I0ca76a40d47f72635682de9303ff73e9b2197266
---
M src/osmocom/gsmtap.py
M tests/test_construct.py
M tests/test_gsup.py
M tests/test_tlv.py
M tests/test_utils.py
5 files changed, 31 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/python/pyosmocom 
refs/changes/84/41384/1

diff --git a/src/osmocom/gsmtap.py b/src/osmocom/gsmtap.py
index 60d7ee4..3474396 100644
--- a/src/osmocom/gsmtap.py
+++ b/src/osmocom/gsmtap.py
@@ -25,7 +25,7 @@
 import socket
 from construct import Int8ub, Int8sb, Int32ub, BitStruct, Enum, GreedyBytes, 
Struct, Switch
 from construct import this, PaddedString, Flag, BitsInteger, Bytes
-from osmocom.construct import *
+from osmocom.construct import parse_construct

 # The root definition of GSMTAP can be found at
 # https://cgit.osmocom.org/cgit/libosmocore/tree/include/osmocom/core/gsmtap.h
diff --git a/tests/test_construct.py b/tests/test_construct.py
index 94ae71f..4c56734 100755
--- a/tests/test_construct.py
+++ b/tests/test_construct.py
@@ -2,7 +2,18 @@

 import unittest
 from osmocom.utils import b2h, h2b
-from osmocom.construct import *
+from osmocom.construct import (
+    Asn1DerInteger,
+    Bytes,
+    DnsAdapter,
+    GreedyInteger,
+    GreedyBytes,
+    PlmnAdapter,
+    StripHeaderAdapter,
+    StripTrailerAdapter,
+    Ucs2Adapter,
+    filter_dict,
+)
 # pylint: disable=no-name-in-module
 from construct import FlagsEnum

diff --git a/tests/test_gsup.py b/tests/test_gsup.py
index db3f29e..c6f2429 100755
--- a/tests/test_gsup.py
+++ b/tests/test_gsup.py
@@ -4,7 +4,7 @@
 from pprint import pprint as pp

 from osmocom.utils import b2h, h2b
-from osmocom.gsup.message import *
+from osmocom.gsup.message import GsupMessage


 class Test_GSUP(unittest.TestCase):
diff --git a/tests/test_tlv.py b/tests/test_tlv.py
index 3af1e07..0a02b55 100755
--- a/tests/test_tlv.py
+++ b/tests/test_tlv.py
@@ -18,7 +18,22 @@

 import unittest
 from construct import Int8ub, GreedyBytes
-from osmocom.tlv import *
+from osmocom.tlv import (
+    COMPACT_TLV_IE,
+    IE,
+    TLV_IE_Collection,
+    Transcodable,
+    bertlv_encode_len,
+    bertlv_parse_len,
+    bertlv_parse_one,
+    bertlv_parse_tag,
+    camel_to_snake,
+    comprehensiontlv_encode_tag,
+    comprehensiontlv_parse_tag,
+    dgi_encode_len,
+    dgi_parse_len,
+    flatten_dict_lists,
+)
 from osmocom.utils import h2b

 class TestBerTlv(unittest.TestCase):
diff --git a/tests/test_utils.py b/tests/test_utils.py
index 0f22e35..1b80011 100755
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -18,7 +18,7 @@

 import unittest

-from osmocom.utils import *
+from osmocom.utils import hexstr, int_bytes_required

 class TestHexstr(unittest.TestCase):
     def test_cmp(self):

--
To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/41384?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: I0ca76a40d47f72635682de9303ff73e9b2197266
Gerrit-Change-Number: 41384
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <[email protected]>

Reply via email to