Closed analogue closed 3 years ago
Ok, mypy is failing on travis because of the pytest version but passes internally:
Can't find anything in the pytest changelog that would be responsible for this error:
$ tox
GLOB sdist-make: /home/travis/build/Yelp/bravado-core/setup.py
mypy create: /home/travis/build/Yelp/bravado-core/.tox/mypy
mypy installdeps: -rrequirements-dev.txt
mypy inst: /home/travis/build/Yelp/bravado-core/.tox/.tmp/package/1/bravado-core-5.17.0.zip
mypy installed: appdirs==1.4.4,attrs==20.2.0,bravado-core==5.17.0,cfgv==3.2.0,coverage==5.3,distlib==0.3.1,filelock==3.0.12,identify==1.5.5,idna==2.10,importlib-metadata==2.0.0,iniconfig==1.0.1,jsonpointer==2.0,jsonref==0.2,jsonschema==3.2.0,mock==4.0.2,msgpack==1.0.0,mypy==0.782,mypy-extensions==0.4.3,nodeenv==1.5.0,packaging==20.4,pluggy==0.13.1,pre-commit==2.7.1,py==1.9.0,py-cpuinfo==7.0.0,pygal==2.4.0,pygaljs==1.0.2,pyparsing==2.4.7,pyrsistent==0.17.3,pytest==6.1.0,pytest-benchmark==3.2.3,pytest-cov==2.10.1,python-dateutil==2.8.1,pytz==2020.1,PyYAML==5.3.1,rfc3987==1.3.8,simplejson==3.17.2,six==1.15.0,strict-rfc3339==0.7,swagger-spec-validator==2.7.3,toml==0.10.1,typed-ast==1.4.1,typing-extensions==3.7.4.3,virtualenv==20.0.31,webcolors==1.11.1,zipp==3.2.0
mypy run-test-pre: PYTHONHASHSEED='2313461019'
mypy run-test: commands[0] | mypy bravado_core tests
.tox/mypy/lib/python3.7/site-packages/pytest/collect.py:24: error: invalid syntax
Found 1 error in 1 file (checked 143 source files)
ERROR: InvocationError for command /home/travis/build/Yelp/bravado-core/.tox/mypy/bin/mypy bravado_core tests (exited with code 2)
___________________________________ summary ____________________________________
ERROR: mypy: commands failed
The command "tox" exited with 1.
Played aroudn with mypy a bit but didn't find any leads. Can't see anything unusual about collect.py:24 and why mypy would have an issue with the syntax.
I'll go ahead and commit this as is and leave the mypy failure for another PR.
It's the type annotations in collect.py that trip mypy up, since we're setting python_version = 2.7
in mypy.ini. pytest dropped compatibility with Python 2.7 in pytest 5. I'm going to post a PR in a bit.
Minor cleanup from removal of python3.5 support