Skip to content

Commit

Permalink
Merge pull request #245 from asottile/fix_flake8
Browse files Browse the repository at this point in the history
Fix CI (flake8 errors)
  • Loading branch information
ekalinin authored Jan 1, 2020
2 parents e0914dd + 0909ba6 commit 1cd15d7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nodeenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,11 +698,12 @@ def install_node(env_dir, src_dir, opt):
"""
try:
install_node_wrapped(env_dir, src_dir, opt)
except:
except BaseException:
# this restores the newline suppressed by continued=True
logger.info()
raise


def install_node_wrapped(env_dir, src_dir, opt):
env_dir = abspath(env_dir)
prefix = get_binary_prefix()
Expand Down Expand Up @@ -1420,7 +1421,7 @@ def main():
function freeze -d 'Show a list of installed packages - like `pip freeze`'
set -l NPM_VER (npm -v | cut -d '.' -f 1)
set -l RE "[a-zA-Z0-9\.\-]+@[0-9]+\.[0-9]+\.[0-9]+([\+\-][a-zA-Z0-9\.\-]+)*"
set -l RE "[a-zA-Z0-9\\.\\-]+@[0-9]+\\.[0-9]+\\.[0-9]+([\\+\\-][a-zA-Z0-9\\.\\-]+)*"
if test "$NPM_VER" = "0"
set -g NPM_LIST (npm list installed active >/dev/null ^/dev/null | \
Expand All @@ -1431,7 +1432,7 @@ def main():
set NPM_LS "npm ls"
set -e argv[1]
end
set -l NPM_LIST (eval $NPM_LS | grep -E '^.{4}\w{1}' | \
set -l NPM_LIST (eval $NPM_LS | grep -E '^.{4}\\w{1}' | \
grep -o -E "$re" | \
grep -v npm)
end
Expand Down Expand Up @@ -1494,7 +1495,7 @@ def main():
set -gx _OLD_NODE_FISH_PROMPT_OVERRIDE "$NODE_VIRTUAL_ENV"
end
""" # noqa
""" # noqa: E501

PREDEACTIVATE_SH = """
if type -p deactivate_node > /dev/null; then deactivate_node;fi
Expand Down

0 comments on commit 1cd15d7

Please sign in to comment.