Attention is currently required from: fixeria, dexter.

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

Change subject: pySim-shell: fix compatibility problem with cmd2 >= 2.0.0 
(Settable)
......................................................................


Patch Set 12:

(1 comment)

File pySim-shell.py:

https://gerrit.osmocom.org/c/pysim/+/32532/comment/2ba819e5_7f79db6b
PS12, Line 162:             # pylint: disable=E1121
> I have tested this also with too-many-function-args but it seems not to be 
> recognized by pylint. […]
We currently use a rather old pylint version (the one in debian buster), so 
apparently it doesn't disable the check for the whole block as it says in the 
documentation.

Adding it at the end of each line, and adding a \ for multiline statements 
makes it work with the current version in the meantime.

```
            self.add_settable(cmd2.Settable('numeric_path', bool, 'Print File 
IDs instead of names', self, \
                                            
onchange_cb=self._onchange_numeric_path))  # pylint: 
disable=too-many-function-args
            self.add_settable(cmd2.Settable('conserve_write', bool, 'Read and 
compare before write', self, \
                                            
onchange_cb=self._onchange_conserve_write))  # pylint: 
disable=too-many-function-args
            self.add_settable(cmd2.Settable('json_pretty_print', bool, 
'Pretty-Print JSON output', self))  # pylint: disable=too-many-function-args
            self.add_settable(cmd2.Settable('apdu_trace', bool, 'Trace and 
display APDUs exchanged with card', self, \
                                            
onchange_cb=self._onchange_apdu_trace))  # pylint: 
disable=too-many-function-args
```

as diff:

```
diff --git a/pySim-shell.py b/pySim-shell.py
index 1e390d2..f265f5d 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -159,14 +159,13 @@ class PysimApp(cmd2.Cmd):
             self.add_settable(cmd2.Settable('apdu_trace', bool, 'Trace and 
display APDUs exchanged with card',
                                             
onchange_cb=self._onchange_apdu_trace))
         else:
-            # pylint: disable=E1121
-            self.add_settable(cmd2.Settable('numeric_path', bool, 'Print File 
IDs instead of names', self,
-                                            
onchange_cb=self._onchange_numeric_path))
-            self.add_settable(cmd2.Settable('conserve_write', bool, 'Read and 
compare before write', self,
-                                            
onchange_cb=self._onchange_conserve_write))
-            self.add_settable(cmd2.Settable('json_pretty_print', bool, 
'Pretty-Print JSON output', self))
-            self.add_settable(cmd2.Settable('apdu_trace', bool, 'Trace and 
display APDUs exchanged with card', self,
-                                            
onchange_cb=self._onchange_apdu_trace))
+            self.add_settable(cmd2.Settable('numeric_path', bool, 'Print File 
IDs instead of names', self, \
+                                            
onchange_cb=self._onchange_numeric_path))  # pylint: 
disable=too-many-function-args
+            self.add_settable(cmd2.Settable('conserve_write', bool, 'Read and 
compare before write', self, \
+                                            
onchange_cb=self._onchange_conserve_write))  # pylint: 
disable=too-many-function-args
+            self.add_settable(cmd2.Settable('json_pretty_print', bool, 
'Pretty-Print JSON output', self))  # pylint: disable=too-many-function-args
+            self.add_settable(cmd2.Settable('apdu_trace', bool, 'Trace and 
display APDUs exchanged with card', self, \
+                                            
onchange_cb=self._onchange_apdu_trace))  # pylint: 
disable=too-many-function-args
         self.equip(card, rs)

     def equip(self, card, rs):
```



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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I38efe4702277ee092a5542d7d659df08cb0adeff
Gerrit-Change-Number: 32532
Gerrit-PatchSet: 12
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-CC: laforge <[email protected]>
Gerrit-CC: osmith <[email protected]>
Gerrit-Attention: fixeria <[email protected]>
Gerrit-Attention: dexter <[email protected]>
Gerrit-Comment-Date: Wed, 03 May 2023 11:48:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: dexter <[email protected]>
Gerrit-MessageType: comment

Reply via email to