Skip to content

Commit

Permalink
Avoid reuse of variable name for values of different types.
Browse files Browse the repository at this point in the history
Mypy just doesn't like this when it's done in the local scope
(see python/mypy#1174).
  • Loading branch information
shawnbrown committed Sep 11, 2021
1 parent 087f1aa commit 8f15b04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions envlauncher/launchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,10 @@ def build_args(object_path, method, *contents) -> List[str]:
@staticmethod
def parse_session_id(reply: bytes) -> int:
"""Takes an `addSession` reply and returns the id as an int."""
reply = str(reply, encoding=sys.stdout.encoding)
matched = re.search(r'(?:int16|int32|int64)[ ](\d+)', reply)
reply_str = str(reply, encoding=sys.stdout.encoding)
matched = re.search(r'(?:int16|int32|int64)[ ](\d+)', reply_str)
if not matched:
msg = f'Unable to get Yakuake tab session-id: {reply!r}'
msg = f'Unable to get Yakuake tab session-id: {reply_str!r}'
raise RuntimeError(msg)
return int(matched.group(1))

Expand Down

0 comments on commit 8f15b04

Please sign in to comment.