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

MyPy linter is broken in tox and Travis CI ignores this #439

Closed
webknjaz opened this issue Dec 11, 2018 · 6 comments
Closed

MyPy linter is broken in tox and Travis CI ignores this #439

webknjaz opened this issue Dec 11, 2018 · 6 comments

Comments

@webknjaz
Copy link
Member

Failed mypy command still produces a green build.
Demo: https://travis-ci.org/pypa/twine/jobs/465465836#L591-L594

@di
Copy link
Sponsor Member

di commented Dec 11, 2018

The output of the mypy check is explicitly being ignored, hence the leading dash:

twine/tox.ini

Line 42 in ff475aa

-mypy -s twine/ tests/

@webknjaz
Copy link
Member Author

Yep, and further investigation has shown that at the time this line was added (https://github.com/pypa/twine/pull/380/files#diff-b91f3d5bd63fcd17221b267e851608e8L42) mypy was at version of 0.610 and produced a warning Warning: --silent-imports has been replaced by --ignore-missing-imports --follow-imports=skip (https://travis-ci.org/pypa/twine/jobs/400354692#L503-L508).

So because it was completely ignored nobody noticed when after warning period that arg was removed completely.

I'm working on a Travis CI improvement PR and I'm going to separate mypy into a separate check to improve visibility.

webknjaz added a commit to webknjaz/twine that referenced this issue Dec 11, 2018
@webknjaz
Copy link
Member Author

Ref #440

@sigmavirus24
Copy link
Member

This is entirely by design that it was ignored.

@webknjaz
Copy link
Member Author

Well, at least it'll be less broken now

@webknjaz
Copy link
Member Author

I mean it's fine that it's ignored but it's done on the wrong level which caused it to become invisibly broken.

sigmavirus24 pushed a commit that referenced this issue Dec 13, 2018
* Use mapping syntax for declaring env in Travis CI

* Add a Travis CI badge to README

* Fail fast in Travis CI

* Move default toxenv spec to global env

* Reorder jobs in Travis CI

* Linters and docs first
* Latest Pythons of all flavours
* Everything else

* Add names to linting jobs

* Add Travis CI link to project urls meta

* Fix pyblake2 installation conditional in tox

* Fix broken mypy command in tox

Closes #439

* Reorder envs in tox to match Travis CI order

* Move mypy check into separate job allowed to fail

* Set env marker for pyblake2 to check interpreter

* Split the rest of linters into dist vs code checks

* Post code coverage even from failed jobs

* Fix lint envs list

* Add a lint testenv alias to tox

* Put only one lint env into default envlist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants