Skip to content

Commit

Permalink
python: make code compatible with Python3.7
Browse files Browse the repository at this point in the history
* add Pipfile
* de-lint with `flake8`
  • Loading branch information
refack authored and Trott committed Sep 27, 2019
1 parent 2920347 commit e7ee43c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
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()
# 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
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

0 comments on commit e7ee43c

Please sign in to comment.