Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashirtz committed Nov 13, 2022
1 parent b34372e commit 185db85
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pytaurus/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ def get_gcleanup_cmd(
renumbers_nodes: bool = False,
verbose: bool = False,
) -> str:
verbose = ' -verbose' if verbose else ''
verbose_str = ' -verbose' if verbose else ''
if renumbers_nodes:
return f'gcleanup -ren {self._path} {verbose}'
return f'gcleanup -ren {self._path} {verbose_str}'
scope = f'-n {self._get_nodes(nodes)} ' if nodes else ''
command = ' '.join(['gcleanup', scope, verbose, self._path])
command = ' '.join(['gcleanup', scope, verbose_str, self._path])
return command

def get_gsub_cmd(
Expand All @@ -72,8 +72,8 @@ def get_gsub_cmd(
verbose: bool = False,
) -> str:
scope = f'-n {self._get_nodes(nodes)}' if nodes else '-e all'
verbose = ' -verbose' if verbose else ''
command = ' '.join(['gsub', scope, verbose, self._path])
verbose_str = ' -verbose' if verbose else ''
command = ' '.join(['gsub', scope, verbose_str, self._path])
return command

def _execute_cmd(
Expand Down

0 comments on commit 185db85

Please sign in to comment.