Attention is currently required from: laforge.

osmith has posted comments on this change by osmith. ( 
https://gerrit.osmocom.org/c/python/pyosmocom/+/41384?usp=email )

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


Patch Set 2:

(1 comment)

File tests/test_construct.py:

https://gerrit.osmocom.org/c/python/pyosmocom/+/41384/comment/f87bcc9a_d4fda524?usp=email
 :
PS2, Line 8:     DnsAdapter,
> we're not using this parenthesized list with one item per line anywhere else. 
> […]
So far we don't have a "from X import" line in pyosmocom that exceeds the 120 
character limit which we use for lines, so we need to introduce a new way of 
writing this if we don't use star imports anymore.

The alternatives would be:
```
from osmocom.construct import Asn1DerInteger, Bytes, DnsAdapter, GreedyInteger, 
GreedyBytes, PlmnAdapter, \
        StripHeaderAdapter, StripTrailerAdapter, Ucs2Adapter, filter_dict
```
Or:
```
from osmocom.construct import (Asn1DerInteger, Bytes, DnsAdapter, 
GreedyInteger, GreedyBytes, PlmnAdapter,
        StripHeaderAdapter, StripTrailerAdapter, Ucs2Adapter, filter_dict)

```

Which IMHO are both less readable and less diff-friendly. The one item per line 
syntax is also what one gets with `ruff format` if the line exceeds the 
character limit, which is based on PEP 8 and the rules from "black" that are 
widely used (Django, pytest, [many 
more...](https://github.com/psf/black?tab=readme-ov-file#used-by)).

With that being said, if you think another syntax is better then I can update 
the patch to use that. What do you think?



--
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: comment
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: I0ca76a40d47f72635682de9303ff73e9b2197266
Gerrit-Change-Number: 41384
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-Attention: laforge <[email protected]>
Gerrit-Comment-Date: Mon, 10 Nov 2025 08:19:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <[email protected]>

Reply via email to