Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI (flake8 errors) #245

Merged
merged 1 commit into from
Jan 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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