mirror of
https://github.com/saltstack/salt.git
synced 2025-04-15 17:20:19 +00:00
Start linting under Py3
This commit is contained in:
parent
ba07d5658a
commit
0bec0597ab
5 changed files with 84 additions and 18 deletions
|
@ -16,6 +16,7 @@ repos:
|
|||
- --include=requirements/zeromq.txt
|
||||
- --include=requirements/pytest.txt
|
||||
- --remove-line=^pycrypto==(.*)$
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-darwin-py2.7-zmq-requirements
|
||||
name: Darwin Py2.7 ZeroMQ Requirements
|
||||
|
@ -31,6 +32,7 @@ repos:
|
|||
- --include=requirements/pytest.txt
|
||||
- --remove-line=^pycrypto==(.*)$
|
||||
- --passthrough-line-from-input=^pyobjc(.*)$
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-windows-py2.7-zmq-requirements
|
||||
name: Windows Py2.7 ZeroMQ Requirements
|
||||
|
@ -46,15 +48,6 @@ repos:
|
|||
- --include=requirements/pytest.txt
|
||||
- --remove-line=^pycrypto==(.*)$
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-lint-py2.7-requirements
|
||||
name: Lint Py2.7 Requirements
|
||||
files: ^requirements/static/lint\.in$
|
||||
args:
|
||||
- -v
|
||||
- --py-version=2.7
|
||||
- --platform=linux
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-cloud-py2.7-requirements
|
||||
name: Cloud Py2.7 Requirements
|
||||
|
@ -72,6 +65,7 @@ repos:
|
|||
- --py-version=2.7
|
||||
- --platform=linux
|
||||
- --out-prefix=linux
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-darwin-crypto-py2.7-requirements
|
||||
name: Darwin Py2.7 Crypto Requirements
|
||||
|
@ -81,6 +75,7 @@ repos:
|
|||
- --py-version=2.7
|
||||
- --platform=darwin
|
||||
- --out-prefix=darwin
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-windows-crypto-py2.7-requirements
|
||||
name: Windows Py2.7 Crypto Requirements
|
||||
|
@ -124,6 +119,7 @@ repos:
|
|||
- --platform=linux
|
||||
- --out-prefix=linux
|
||||
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-linux-py3.5-zmq-requirements
|
||||
name: Linux Py3.5 ZeroMQ Requirements
|
||||
|
@ -137,6 +133,7 @@ repos:
|
|||
- --include=requirements/zeromq.txt
|
||||
- --include=requirements/pytest.txt
|
||||
- --remove-line=^pycrypto==(.*)$
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-darwin-py3.5-zmq-requirements
|
||||
name: Darwin Py3.5 ZeroMQ Requirements
|
||||
|
@ -152,6 +149,7 @@ repos:
|
|||
- --include=requirements/pytest.txt
|
||||
- --remove-line=^pycrypto==(.*)$
|
||||
- --passthrough-line-from-input=^pyobjc(.*)$
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-windows-py3.5-zmq-requirements
|
||||
name: Windows Py3.5 ZeroMQ Requirements
|
||||
|
@ -193,6 +191,7 @@ repos:
|
|||
- --py-version=3.5
|
||||
- --platform=linux
|
||||
- --out-prefix=linux
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-darwin-crypto-py3.5-requirements
|
||||
name: Darwin Py3.5 Crypto Requirements
|
||||
|
@ -202,6 +201,7 @@ repos:
|
|||
- --py-version=3.5
|
||||
- --platform=darwin
|
||||
- --out-prefix=darwin
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-windows-crypto-py3.5-requirements
|
||||
name: Windows Py3.5 Crypto Requirements
|
||||
|
@ -212,6 +212,16 @@ repos:
|
|||
- --platform=windows
|
||||
- --out-prefix=windows
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-lint-py3.5-requirements
|
||||
name: Lint Py3.5 Requirements
|
||||
files: ^requirements/static/lint\.in$
|
||||
args:
|
||||
- -v
|
||||
- --py-version=3.5
|
||||
- --platform=linux
|
||||
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-linux-py3.6-zmq-requirements
|
||||
name: Linux Py3.6 ZeroMQ Requirements
|
||||
|
@ -225,6 +235,7 @@ repos:
|
|||
- --include=requirements/zeromq.txt
|
||||
- --include=requirements/pytest.txt
|
||||
- --remove-line=^pycrypto==(.*)$
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-darwin-py3.6-zmq-requirements
|
||||
name: Darwin Py3.6 ZeroMQ Requirements
|
||||
|
@ -240,6 +251,7 @@ repos:
|
|||
- --include=requirements/pytest.txt
|
||||
- --remove-line=^pycrypto==(.*)$
|
||||
- --passthrough-line-from-input=^pyobjc(.*)$
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-windows-py3.6-zmq-requirements
|
||||
name: Windows Py3.6 ZeroMQ Requirements
|
||||
|
@ -281,6 +293,7 @@ repos:
|
|||
- --py-version=3.6
|
||||
- --platform=linux
|
||||
- --out-prefix=linux
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-darwin-crypto-py3.6-requirements
|
||||
name: Darwin Py3.6 Crypto Requirements
|
||||
|
@ -290,6 +303,7 @@ repos:
|
|||
- --py-version=3.6
|
||||
- --platform=darwin
|
||||
- --out-prefix=darwin
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-windows-crypto-py3.6-requirements
|
||||
name: Windows Py3.6 Crypto Requirements
|
||||
|
@ -300,6 +314,16 @@ repos:
|
|||
- --platform=windows
|
||||
- --out-prefix=windows
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-lint-py3.6-requirements
|
||||
name: Lint Py3.6 Requirements
|
||||
files: ^requirements/static/lint\.in$
|
||||
args:
|
||||
- -v
|
||||
- --py-version=3.6
|
||||
- --platform=linux
|
||||
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-linux-py3.7-zmq-requirements
|
||||
name: Linux Py3.7 ZeroMQ Requirements
|
||||
|
@ -313,6 +337,7 @@ repos:
|
|||
- --include=requirements/zeromq.txt
|
||||
- --include=requirements/pytest.txt
|
||||
- --remove-line=^pycrypto==(.*)$
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-darwin-py3.7-zmq-requirements
|
||||
name: Darwin Py3.7 ZeroMQ Requirements
|
||||
|
@ -328,6 +353,7 @@ repos:
|
|||
- --include=requirements/pytest.txt
|
||||
- --remove-line=^pycrypto==(.*)$
|
||||
- --passthrough-line-from-input=^pyobjc(.*)$
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-windows-py3.7-zmq-requirements
|
||||
name: Windows Py3.7 ZeroMQ Requirements
|
||||
|
@ -369,6 +395,7 @@ repos:
|
|||
- --py-version=3.7
|
||||
- --platform=linux
|
||||
- --out-prefix=linux
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-darwin-crypto-py3.7-requirements
|
||||
name: Darwin Py3.7 Crypto Requirements
|
||||
|
@ -378,6 +405,7 @@ repos:
|
|||
- --py-version=3.7
|
||||
- --platform=darwin
|
||||
- --out-prefix=darwin
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-windows-crypto-py3.7-requirements
|
||||
name: Windows Py3.7 Crypto Requirements
|
||||
|
@ -388,6 +416,15 @@ repos:
|
|||
- --platform=windows
|
||||
- --out-prefix=windows
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-lint-py3.7-requirements
|
||||
name: Lint Py3.7 Requirements
|
||||
files: ^requirements/static/lint\.in$
|
||||
args:
|
||||
- -v
|
||||
- --py-version=3.7
|
||||
- --platform=linux
|
||||
|
||||
|
||||
- repo: https://github.com/saltstack/salt-nox-pre-commit
|
||||
rev: master
|
||||
|
|
10
noxfile.py
10
noxfile.py
|
@ -942,7 +942,7 @@ def _lint(session, rcfile, flags, paths):
|
|||
stdout.close()
|
||||
|
||||
|
||||
@nox.session(python='2.7')
|
||||
@nox.session(python='3')
|
||||
def lint(session):
|
||||
'''
|
||||
Run PyLint against Salt and it's test suite. Set PYLINT_REPORT to a path to capture output.
|
||||
|
@ -951,7 +951,7 @@ def lint(session):
|
|||
session.notify('lint-tests-{}'.format(session.python))
|
||||
|
||||
|
||||
@nox.session(python='2.7', name='lint-salt')
|
||||
@nox.session(python='3', name='lint-salt')
|
||||
def lint_salt(session):
|
||||
'''
|
||||
Run PyLint against Salt. Set PYLINT_REPORT to a path to capture output.
|
||||
|
@ -963,10 +963,10 @@ def lint_salt(session):
|
|||
paths = session.posargs
|
||||
else:
|
||||
paths = ['setup.py', 'noxfile.py', 'salt/']
|
||||
_lint(session, '.testing.pylintrc', flags, paths)
|
||||
_lint(session, '.pylintrc', flags, paths)
|
||||
|
||||
|
||||
@nox.session(python='2.7', name='lint-tests')
|
||||
@nox.session(python='3', name='lint-tests')
|
||||
def lint_tests(session):
|
||||
'''
|
||||
Run PyLint against Salt and it's test suite. Set PYLINT_REPORT to a path to capture output.
|
||||
|
@ -978,7 +978,7 @@ def lint_tests(session):
|
|||
paths = session.posargs
|
||||
else:
|
||||
paths = ['tests/']
|
||||
_lint(session, '.testing.pylintrc', flags, paths)
|
||||
_lint(session, '.pylintrc', flags, paths)
|
||||
|
||||
|
||||
@nox.session(python='3')
|
||||
|
|
|
@ -2,12 +2,9 @@
|
|||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile -o requirements/static/py2.7/lint.txt -v requirements/static/lint.in
|
||||
# pip-compile -o requirements/static/py3.5/lint.txt -v requirements/static/lint.in
|
||||
#
|
||||
astroid==1.4.9 # via pylint
|
||||
backports.functools-lru-cache==1.5 # via isort, pylint
|
||||
configparser==4.0.2 # via pylint
|
||||
futures==3.2.0 # via isort
|
||||
isort==4.3.17 # via pylint
|
||||
lazy-object-proxy==1.3.1 # via astroid
|
||||
mccabe==0.6.1 # via pylint
|
16
requirements/static/py3.6/lint.txt
Normal file
16
requirements/static/py3.6/lint.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile -o requirements/static/py3.6/lint.txt -v requirements/static/lint.in
|
||||
#
|
||||
astroid==1.4.9 # via pylint
|
||||
isort==4.3.17 # via pylint
|
||||
lazy-object-proxy==1.3.1 # via astroid
|
||||
mccabe==0.6.1 # via pylint
|
||||
modernize==0.5 # via saltpylint
|
||||
pycodestyle==2.5.0 # via saltpylint
|
||||
pylint==1.6.5
|
||||
saltpylint==2019.11.14
|
||||
six==1.12.0 # via astroid, pylint
|
||||
wrapt==1.11.1 # via astroid
|
16
requirements/static/py3.7/lint.txt
Normal file
16
requirements/static/py3.7/lint.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile -o requirements/static/py3.7/lint.txt -v requirements/static/lint.in
|
||||
#
|
||||
astroid==1.4.9 # via pylint
|
||||
isort==4.3.17 # via pylint
|
||||
lazy-object-proxy==1.3.1 # via astroid
|
||||
mccabe==0.6.1 # via pylint
|
||||
modernize==0.5 # via saltpylint
|
||||
pycodestyle==2.5.0 # via saltpylint
|
||||
pylint==1.6.5
|
||||
saltpylint==2019.11.14
|
||||
six==1.12.0 # via astroid, pylint
|
||||
wrapt==1.11.1 # via astroid
|
Loading…
Add table
Reference in a new issue