Check correct pair member
I haven't looked deeply, but this looked to be a simple typo unless it's checking one both times because of a type invariant. If that is the case, and the check is correct, then a comment and/or code refactoring to call attention to this would likely be a good idea.
This commit is contained in:
parent
896f93822d
commit
aab149366d
1 changed files with 1 additions and 1 deletions
|
|
@ -566,7 +566,7 @@ def add_pair(p: Pair) -> Dict[str, Any]:
|
|||
ans['one'] = p.one
|
||||
if isinstance(p.two, Pair):
|
||||
ans['two'] = add_pair(p.two)
|
||||
elif p.one is not None:
|
||||
elif p.two is not None:
|
||||
ans['two'] = p.two
|
||||
return ans
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue