osmith has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/41196?usp=email )
Change subject: Pass pylint 3.3.4 from debian trixie ......................................................................
Pass pylint 3.3.4 from debian trixie
************* Module osmo-smdpp osmo-smdpp.py:657:72: E0606: Possibly using variable 'iccid_str' before assignment (possibly-used-before-assignment)
=> False-positive: code paths that don't set iccid_str raise an error, so this shouldn't be a problem.
************* Module pySim-smpp2sim pySim-smpp2sim.py:427:4: E1101: Module 'twisted.internet.reactor' has no 'run' member (no-member)
=> False-positive: pylint doesn't recognize dynamically set attributes.
************* Module es9p_client contrib/es9p_client.py:126:11: E0606: Possibly using variable 'opts' before assignment (possibly-used-before-assignment)
=> Real bug, should be "self.opts".
Related: https://stackoverflow.com/a/18712867 Change-Id: Id042ba0944b58d98d27e1222ac373c7206158a91 --- M contrib/es9p_client.py M osmo-smdpp.py M pyproject.toml 3 files changed, 6 insertions(+), 2 deletions(-)
Approvals: fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved Jenkins Builder: Verified
diff --git a/contrib/es9p_client.py b/contrib/es9p_client.py index 15a96ae..e9a71fc 100755 --- a/contrib/es9p_client.py +++ b/contrib/es9p_client.py @@ -123,8 +123,8 @@ 'profileManagementOperation': PMO(self.opts.operation).to_bitstring(), 'notificationAddress': self.opts.notification_address or urlparse(self.opts.url).netloc, } - if opts.iccid: - ntf_metadata['iccid'] = h2b(swap_nibbles(opts.iccid)) + if self.opts.iccid: + ntf_metadata['iccid'] = h2b(swap_nibbles(self.opts.iccid))
if self.opts.operation == 'download': pird = { diff --git a/osmo-smdpp.py b/osmo-smdpp.py index a45f842..ed5046d 100755 --- a/osmo-smdpp.py +++ b/osmo-smdpp.py @@ -629,6 +629,7 @@ # If ctxParams1 contains a ctxParamsForCommonAuthentication data object, the SM-DP+ Shall [...] # TODO: We really do a very simplistic job here, this needs to be properly implemented later, # considering all the various cases, profile state, etc. + iccid_str = None if euiccSigned1['ctxParams1'][0] == 'ctxParamsForCommonAuthentication': cpca = euiccSigned1['ctxParams1'][1] matchingId = cpca.get('matchingId', None) diff --git a/pyproject.toml b/pyproject.toml index 9787c3b..8924896 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,6 @@ [build-system] requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" + +[tool.pylint.main] +ignored-classes = ["twisted.internet.reactor"]