HomePhabricator

[lint] run mypy with --install-types and --non-interactive options

Description

[lint] run mypy with --install-types and --non-interactive options

Summary:
This fixes the following class of error messages by automatically installing a PEP 561 stub package if available :

>>> Lint for contrib/teamcity/build-configurations.py:

   Error  () mypy found an issue:
    Library stubs not installed for "yaml"  [import]

Test Plan:
arc lint --everything

Add import toml in some python file and check that it does not cause any new error, and that the python package types-toml is installed after running arc lint (pip list | grep types)

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D13649

Details

Provenance
PiRKAuthored on Apr 10 2023, 12:05
PiRKPushed on Apr 10 2023, 13:22
Reviewer
Restricted Project
Differential Revision
D13649: [lint] run mypy with --install-types and --non-interactive options
Parents
rABCce5c405077ce: [lint] require plugin flake8-comprehensions
Branches
Unknown
Tags
Unknown