Skip to content

Commit

Permalink
[fix] Fix bad refactoring and lint error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Chu committed Jul 8, 2020
1 parent 79bac31 commit aa8b4c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions core/alloc.py
Expand Up @@ -19,6 +19,8 @@

from typing import List, Dict, cast

_ = log


class Arena(object):
"""A collection line spans and associated debug info.
Expand Down
2 changes: 1 addition & 1 deletion osh/prompt.py
Expand Up @@ -257,7 +257,7 @@ def Run(self):
# PROMPT_COMMAND almost never changes, so we try to cache its parsing.
# This avoids memory allocations.
prompt_cmd = cast(value__Str, val).s
node = self.parse_cache[prompt_cmd]
node = self.parse_cache.get(prompt_cmd)
if node is None:
line_reader = reader.StringLineReader(prompt_cmd, self.arena)
c_parser = self.parse_ctx.MakeOshParser(line_reader)
Expand Down

0 comments on commit aa8b4c0

Please sign in to comment.