Skip to content

Commit

Permalink
[builtin/declare] Remove spaces in default/keyword arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Mar 21, 2020
1 parent 9e94f90 commit e2c89a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ def GetVar(self, name, lookup_mode=scope_e.Dynamic):

return value.Undef()

def GetCell(self, name, lookup_mode = scope_e.Dynamic):
def GetCell(self, name, lookup_mode=scope_e.Dynamic):
# type: (str, scope_t) -> cell
"""For the 'repr' builtin."""
cell, _ = self._ResolveNameOnly(name, lookup_mode)
Expand Down Expand Up @@ -1497,7 +1497,7 @@ def GetAllVars(self):
result[name] = str_val.s
return result

def GetAllCells(self, lookup_mode = scope_e.Dynamic):
def GetAllCells(self, lookup_mode=scope_e.Dynamic):
# type: (scope_t) -> Dict[str, cell]
"""Get all variables and their values, for 'set' builtin. """
result = {} # type: Dict[str, str]
Expand Down
6 changes: 3 additions & 3 deletions osh/builtin_assign.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from frontend import arg_def


def _PrintVariables(mem, cmd_val, arg, print_flags, readonly = False, exported = False):
def _PrintVariables(mem, cmd_val, arg, print_flags, readonly=False, exported=False):
# type: (Mem, value_t, Any, bool, bool, bool) -> int
flag_g = getattr(arg, 'g', None)
flag_n = getattr(arg, 'n', None)
Expand Down Expand Up @@ -173,7 +173,7 @@ def Run(self, cmd_val):
"doesn't accept -f because it's dangerous. (The code can usually be restructured with 'source')")

if arg.p or len(cmd_val.pairs) == 0:
return _PrintVariables(self.mem, cmd_val, arg, True, exported = True)
return _PrintVariables(self.mem, cmd_val, arg, True, exported=True)

positional = cmd_val.argv[arg_index:]
if arg.n:
Expand Down Expand Up @@ -243,7 +243,7 @@ def Run(self, cmd_val):
arg, arg_index = READONLY_SPEC.Parse(arg_r)

if arg.p or len(cmd_val.pairs) == 0:
return _PrintVariables(self.mem, cmd_val, arg, True, readonly = True)
return _PrintVariables(self.mem, cmd_val, arg, True, readonly=True)

for pair in cmd_val.pairs:
if pair.rval is None:
Expand Down

0 comments on commit e2c89a0

Please sign in to comment.