Page MenuHomeSoftware Heritage

Make recent version mypy happy
ClosedPublic

Authored by ardumont on Jun 9 2021, 10:49 AM.

Diff Detail

Repository
rDICP Icinga plugins
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 21814
Build 33923: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 33922: arc lint + arc unit

Event Timeline

Note that the same version within the venv (used by pre-commit) is complaining at commit though...

$ mypy swh
swh/icinga_plugins/tests/web_scenario.py:73: error: unused "type: ignore" comment
Found 1 error in 1 file (checked 14 source files)
$ pre-commit run --all-files
Trim Trailing Whitespace.................................................Passed
Check JSON...........................................(no files to check)Skipped
Check Yaml...............................................................Passed
flake8...................................................................Passed
codespell................................................................Passed
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

swh/icinga_plugins/tests/web_scenario.py:73: error: unused "type: ignore" comment
Found 1 error in 1 file (checked 14 source files)

isort....................................................................Passed
black....................................................................Passed

$ pip list | grep mypy
mypy                          0.901
mypy-extensions               0.4.3

Build is green

Patch application report for D5830 (id=20852)

Rebasing onto e142fbcf80...

Current branch diff-target is up to date.
Changes applied before test
commit b8728769172a80fd2529ea268c37828dc679f125
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jun 9 10:48:26 2021 +0200

    Make recent version mypy happy

See https://jenkins.softwareheritage.org/job/DICP/job/tests-on-diff/36/ for more details.

Install stubs instead of ignoring them

anlambert added a subscriber: anlambert.

Note that the same version within the venv (used by pre-commit) is complaining at commit though...

fyi, I cannot reproduce from my side:

(swh) ✘-2 ~/swh/swh-environment/swh-icinga-plugins [master|✔] 
11:11 $ arc patch D5830
Created and checked out branch arcpatch-D5830.
Checking patch swh/__init__.py...
Checking patch mypy.ini...
Applied patch swh/__init__.py cleanly.
Applied patch mypy.ini cleanly.
 COMMITTED  Successfully committed patch.
(swh) ✔ ~/swh/swh-environment/swh-icinga-plugins [arcpatch-D5830 L|✔] 
11:11 $ make check 
pre-commit run --all-files
Trim Trailing Whitespace.................................................Passed
Check JSON...........................................(no files to check)Skipped
Check Yaml...............................................................Passed
flake8...................................................................Passed
codespell................................................................Passed
mypy.....................................................................Passed
isort....................................................................Passed
black....................................................................Passed
(swh) ✔ ~/swh/swh-environment/swh-icinga-plugins [arcpatch-D5830 L|✔] 
11:12 $ pip list | grep mypy
mypy                          0.901
mypy-extensions               0.4.3
(swh) ✔ ~/swh/swh-environment/swh-icinga-plugins [arcpatch-D5830 L|✔] 
11:12 $ pip install --upgrade mypy-extensions
Requirement already satisfied: mypy-extensions in /home/anlambert/.virtualenvs/swh/lib/python3.7/site-packages (0.4.3)
(swh) ✔ ~/swh/swh-environment/swh-icinga-plugins [arcpatch-D5830 L|✔] 
11:12 $ make check 
pre-commit run --all-files
Trim Trailing Whitespace.................................................Passed
Check JSON...........................................(no files to check)Skipped
Check Yaml...............................................................Passed
flake8...................................................................Passed
codespell................................................................Passed
mypy.....................................................................Passed
isort....................................................................Passed
black....................................................................Passed
(swh) ✔ ~/swh/swh-environment/swh-icinga-plugins [arcpatch-D5830 L|✔] 
11:13 $ mypy swh
Success: no issues found in 14 source files
This revision is now accepted and ready to land.Jun 9 2021, 11:15 AM

Note that the same version within the venv (used by pre-commit) is complaining at commit though...

fyi, I cannot reproduce from my side:

lolsad, that's both great and saddens me a bit though ;)

Build is green

Patch application report for D5830 (id=20856)

Rebasing onto e142fbcf80...

Current branch diff-target is up to date.
Changes applied before test
commit 4d98ef2509ceaa48ffee22daadd892b8393e09ed
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jun 9 10:48:26 2021 +0200

    Make recent version mypy happy

See https://jenkins.softwareheritage.org/job/DICP/job/tests-on-diff/37/ for more details.

This revision was automatically updated to reflect the committed changes.