mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 16:14:23 +01:00
pyln-client/gossmap: more fixes, make mypy happier.
Mainly fixing type annotations, but some real fixes: 1. GossmapHalfchannel.from_str() should be a classmethod. 2. update_channel had weird, unusable default values (fields can't be NULL, since we use it below). [ There was one more occurence where isinstance should be used above type() == xyz comparison. -- MS ] Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -310,7 +310,7 @@ other types. Since 'msgtype' is almost identical, it inherits from this too.
|
||||
f.fieldtype.write(io_out, val, otherfields)
|
||||
|
||||
def read(self, io_in: BufferedIOBase, otherfields: Dict[str, Any]) -> Optional[Dict[str, Any]]:
|
||||
vals = {}
|
||||
vals: Dict[str, Any] = {}
|
||||
for field in self.fields:
|
||||
val = field.fieldtype.read(io_in, vals)
|
||||
if val is None:
|
||||
|
||||
Reference in New Issue
Block a user