Skip to content

Commit

Permalink
Spelling.
Browse files Browse the repository at this point in the history
  • Loading branch information
bfloch committed Aug 29, 2019
1 parent b5e1999 commit 89acad7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/rez/rex.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ class ActionInterpreter(object):
expand_env_vars = False

# RegEx that captures environment variables (generic form).
# Extend/Override to regex formats that can captured environment formats
# Extend/override to regex formats that can capture environment formats
# in other interpreters like shells if needed
ENV_VAR_REGEX = re.compile(
"|".join([
Expand Down
5 changes: 2 additions & 3 deletions src/rez/shells.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,8 @@ def _addline(self, line):

def convert_tokens(self, value):
"""
Converts any token form like ${VAR} and $VAR to shell specific
form. Uses the ENV_VAR_REGEX class variable to correctly parse
variables.
Converts any token like ${VAR} and $VAR to shell specific form.
Uses the ENV_VAR_REGEX to correctly parse tokens.
Args:
value: str to convert
Expand Down
2 changes: 1 addition & 1 deletion src/rez/tests/test_shells.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def _execute_code(func, expected_output):
out, _ = p.communicate()
self.assertEqual(p.returncode, 0)

# Powershell and Unix uses \n
# PowerShell and Unix uses \n
sh = create_shell()

output = out.strip().split(sh.line_terminator())
Expand Down
2 changes: 1 addition & 1 deletion src/rez/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def create_executable_script(filepath, body, program=None, py_script_mode=None):
# default python, or in case of later python versions 'py' that should
# try to use sensible python interpreters depending on the shebang line.
# Compare PEP-397.
# In order to execution to work from windows we need to create a .py
# In order for execution to work in windows we need to create a .py
# file and set the PATHEXT to include .py (as done by the shell plugins)
# So depending on the py_script_mode we might need to create more then
# one script
Expand Down
6 changes: 3 additions & 3 deletions src/rezplugins/shell/powershell_common/powershell_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@

class PowerShellBase(Shell):
"""
Abstract base class for Powershell-like shells.
Abstract base class for PowerShell-like shells.
"""
expand_env_vars = True

syspaths = None
_executable = None

# Make sure that the $Env:VAR formats come before the $VAR formats since
# Powershell Environment variables are ambiguous with Unix paths.
# PowerShell Environment variables are ambiguous with Unix paths.
ENV_VAR_REGEX = re.compile(
"|".join([
"\\$[Ee][Nn][Vv]:([a-zA-Z_]+[a-zA-Z0-9_]*?)", # $Env:ENVVAR
Expand Down Expand Up @@ -142,7 +142,7 @@ def _bind_interactive_rez(self):
self._addline('Function prompt {"%s"}' % self.settings.prompt)

def _additional_commands(self, executor):
# Make .py launch within cmd without extension.
# Make .py launch within shell without extension.
# For PowerShell this will also execute in the same window, so that
# stdout can be captured.
if platform_.name == "windows" and self.settings.additional_pathext:
Expand Down
2 changes: 1 addition & 1 deletion src/rezplugins/shell/pwsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_syspaths(cls):
else:
# TODO: Newer versions of pwsh will parse .profile via sh [1], so
# we could use a similar technique as SH itself. For now, to
# support older pwsh version we depend on SH on unix like platforms
# support older pwsh version we depend on SH on Unix-like platforms
# directly.
# [1] https://github.com/PowerShell/PowerShell/pull/10050
from rezplugins.shell.sh import SH
Expand Down

0 comments on commit 89acad7

Please sign in to comment.