File tree Expand file tree Collapse file tree 4 files changed +21
-9
lines changed
Expand file tree Collapse file tree 4 files changed +21
-9
lines changed Original file line number Diff line number Diff line change 2323 with :
2424 python-version : ${{ matrix.python-version }}
2525 - name : Install python prerequisites
26- run : pip install -U --user pip setuptools setuptools-scm flake8
26+ run : pip install -U --user pip setuptools setuptools-scm nox
2727 - name : Lint
28- run : python -m flake8 .
28+ run : python -m nox --non-interactive --session validate-${{ matrix.python-version }} -k flake8
Original file line number Diff line number Diff line change 2323 with :
2424 python-version : ${{ matrix.python-version }}
2525 - name : Install python prerequisites
26- run : pip install -U --user pip setuptools setuptools-scm mypy
26+ run : pip install -U --user pip setuptools setuptools-scm nox
2727 - name : MyPy
28- run : python -m mypy cmd2
28+ run : python -m nox --non-interactive --session validate-${{ matrix.python-version }} -k mypy # Run nox for mypy
Original file line number Diff line number Diff line change @@ -39,3 +39,10 @@ def tests(session, plugin):
3939 '--no-pty' ,
4040 '--append-cov' ,
4141 )
42+
43+
44+ @nox .session (python = ['3.8' , '3.9' ])
45+ @nox .parametrize ('step' , ['mypy' , 'flake8' ])
46+ def validate (session , step ):
47+ session .install ('invoke' , './[validate]' )
48+ session .run ('invoke' , step )
Original file line number Diff line number Diff line change 6666 ],
6767 # development only dependencies: install with 'pip install -e .[dev]'
6868 'dev' : [
69- "pytest>=4.6" ,
7069 'codecov' ,
70+ 'doc8' ,
71+ 'flake8' ,
72+ 'invoke' ,
73+ 'mypy==0.902' ,
74+ 'nox' ,
75+ "pytest>=4.6" ,
7176 'pytest-cov' ,
7277 'pytest-mock' ,
73- 'nox' ,
74- 'flake8' ,
7578 'sphinx' ,
7679 'sphinx-rtd-theme' ,
7780 'sphinx-autobuild' ,
78- 'doc8' ,
79- 'invoke' ,
8081 'twine>=1.11' ,
8182 ],
83+ 'validate' : [
84+ 'flake8' ,
85+ 'mypy==0.902' ,
86+ ],
8287}
8388
8489PACKAGE_DATA = {
You can’t perform that action at this time.
0 commit comments