laforge submitted this change.

View Change

Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve
Fix lint errors: unused imports

This is the first patch in a series to address everything found with
"ruff check", so we can run it in CI (additionally to pylint) and
locally as pre-commit hook.

Change-Id: Ie71039d05e9a7cc8b65543c9475b35adcb458f7e
---
M src/osmocom/construct.py
M src/osmocom/gsmtap.py
M src/osmocom/gsup/message.py
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/osmocom/construct.py b/src/osmocom/construct.py
index 5e062c3..31e2a77 100644
--- a/src/osmocom/construct.py
+++ b/src/osmocom/construct.py
@@ -4,7 +4,8 @@
import codecs
import ipaddress

-import gsm0338
+# Not an unused import: registers the gsm0338 codec
+import gsm0338 # noqa: F401


# pylint: disable=import-error,no-name-in-module
diff --git a/src/osmocom/gsmtap.py b/src/osmocom/gsmtap.py
index f21ba03..60d7ee4 100644
--- a/src/osmocom/gsmtap.py
+++ b/src/osmocom/gsmtap.py
@@ -23,7 +23,6 @@
#

import socket
-from construct import Optional as COptional
from construct import Int8ub, Int8sb, Int32ub, BitStruct, Enum, GreedyBytes, Struct, Switch
from construct import this, PaddedString, Flag, BitsInteger, Bytes
from osmocom.construct import *
diff --git a/src/osmocom/gsup/message.py b/src/osmocom/gsup/message.py
index e48cd54..31fab2c 100644
--- a/src/osmocom/gsup/message.py
+++ b/src/osmocom/gsup/message.py
@@ -30,7 +30,7 @@
from construct import Optional as COptional

from osmocom.tlv import TLV_IE, TLV_IE_Collection
-from osmocom.construct import TonNpi, Rpad, OsmoRatType
+from osmocom.construct import TonNpi, OsmoRatType
from osmocom.construct import PaddedBcdAdapter, DnsAdapter, Ipv4Adapter, Ipv6Adapter

class GSUP_TLV_IE(TLV_IE):

To view, visit change 41381. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: Ie71039d05e9a7cc8b65543c9475b35adcb458f7e
Gerrit-Change-Number: 41381
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>