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

ansible: add Pipfile and make python3 compatible #1399

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
File renamed without changes.
14 changes: 14 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
ansible = "*"
"flake8" = "*"
"flake8-import-order" = "*"

[dev-packages]

[requires]
python_version = "3.7"
9 changes: 4 additions & 5 deletions ansible/plugins/inventory/nodejs_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,8 @@ def has_metadata(info):


if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--list', action='store_true')
parser.add_argument('--host', action='store')
args = parser.parse_args()

# parser = argparse.ArgumentParser()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we checking in commented code?

# parser.add_argument('--list', action='store_true')
# parser.add_argument('--host', action='store')
# args = parser.parse_args()
main()
1 change: 1 addition & 0 deletions jenkins/scripts/coverage/generate-index-html.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
with open('out/index.csv') as index:
index_csv = filter(lambda line: line, index.read().split('\n'))

# noqa

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment incomplete?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM: This flake8 linter directive will silence the linter as discussed at
http://flake8.pycqa.org/en/3.7.7/user/violations.html#in-line-ignoring-errors

with open('out/index.html', 'w') as out:
out.write('''
<!DOCTYPE html>
Expand Down
3 changes: 2 additions & 1 deletion setup/www/host_vars/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
infra-*
infra-*
!node-www.tmpl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're tracking this file https://github.com/nodejs/build/blob/master/setup/www/host_vars/node-www.tmpl
(keeping it ignored, make my IDE angry)