Change in pysim[master]: Add more documentation to the classes/methods

fixeria gerrit-no-reply at lists.osmocom.org
Fri Apr 2 13:36:14 UTC 2021


fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/23577 )

Change subject: Add more documentation to the classes/methods
......................................................................


Patch Set 2:

(5 comments)

https://gerrit.osmocom.org/c/pysim/+/23577/2/pySim/commands.py 
File pySim/commands.py:

https://gerrit.osmocom.org/c/pysim/+/23577/2/pySim/commands.py@141 
PS2, Line 141: length:int=None
Python is weird:

* for arguments without type hints their PEP recommends no spaces around '=';
* for arguments with type hints they recommend: length: int = None.

Just a cosmetic note.


https://gerrit.osmocom.org/c/pysim/+/23577/2/pySim/filesystem.py 
File pySim/filesystem.py:

https://gerrit.osmocom.org/c/pysim/+/23577/2/pySim/filesystem.py@45 
PS2, Line 45: parent:'CardDF'=None
The linters won't be happy about this, you need

  from typing import Optional
  parent: Optional('CardDF') = None

if None is permitted.


https://gerrit.osmocom.org/c/pysim/+/23577/2/pySim/filesystem.py@106 
PS2, Line 106: alias:str=None
Same here, it's Optional.


https://gerrit.osmocom.org/c/pysim/+/23577/2/pySim/filesystem.py@235 
PS2, Line 235: CardFile
Optional, there can be None


https://gerrit.osmocom.org/c/pysim/+/23577/2/pySim/filesystem.py@410 
PS2, Line 410: fid:str, sfid:str=None, name:str=None, desc:str=None, parent:CardDF=None
Unrelated: if they all are optional, then using **kw may be a good idea.



-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/23577
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I6ac88e0662cf3c56ae32d86d50b18a8b4150571a
Gerrit-Change-Number: 23577
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: tnt <tnt at 246tNt.com>
Gerrit-Comment-Date: Fri, 02 Apr 2021 13:36:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210402/ee5c3176/attachment.htm>


More information about the gerrit-log mailing list