Stop running mypy in linters

We aren't generally using type annotations, and mypy itself is
somewhat flawed, occasionally producing false positives and rarely
catching errors.  Stop running it.

Change-Id: I6f24457f7d99ca11ec9228e505e6edec558baf9e
This commit is contained in:
James E. Blair 2021-08-05 06:42:33 -07:00
parent c8ea9be2be
commit f718b16844
6 changed files with 7 additions and 12 deletions

View File

@ -54,16 +54,11 @@ commands = bindep test
[testenv:linters]
usedevelop = False
install_command = pip install {opts} {packages}
# --ignore-missing-imports tells mypy to not try to follow imported modules
# out of the current tree. As you might expect, we don't want to run static
# type checking on the world - just on ourselves.
deps =
flake8
mypy<0.790
openapi-spec-validator
commands =
flake8 {posargs}
mypy
openapi-spec-validator web/public/openapi.yaml
[testenv:cover]

View File

@ -21,14 +21,14 @@ from yaml import YAMLError # noqa: F401
try:
# Explicit type ignore to deal with provisional import failure
# Details at https://github.com/python/mypy/issues/1153
from yaml import cyaml # type: ignore
from yaml import cyaml
import _yaml
SafeLoader = cyaml.CSafeLoader
SafeDumper = cyaml.CSafeDumper
Mark = _yaml.Mark
except ImportError:
SafeLoader = yaml.SafeLoader # type: ignore
SafeDumper = yaml.SafeDumper # type: ignore
SafeLoader = yaml.SafeLoader
SafeDumper = yaml.SafeDumper
Mark = yaml.Mark

View File

@ -778,7 +778,7 @@ class Merger(object):
self.log = logging.getLogger("zuul.Merger")
else:
self.log = logger
self.repos = {} # type: ignore
self.repos = {}
self.working_root = working_root
os.makedirs(working_root, exist_ok=True)
self.connections = connections

View File

@ -2198,7 +2198,7 @@ class BuildRequest(JobRequest):
# States:
PAUSED = 'paused'
ALL_STATES = JobRequest.ALL_STATES + (PAUSED,) # type: ignore
ALL_STATES = JobRequest.ALL_STATES + (PAUSED,)
def __init__(self, uuid, zone,
tenant_name, pipeline_name, event_id,

View File

@ -23,7 +23,7 @@ from zuul.zk.job_request_queue import JobRequestQueue
class ExecutorQueue(JobRequestQueue):
log = logging.getLogger("zuul.ExecutorQueue")
request_class = BuildRequest # type: ignore
request_class = BuildRequest
def __init__(self, client, root,
initial_state_getter,

View File

@ -20,7 +20,7 @@ from zuul.zk.job_request_queue import JobRequestQueue
class MergerApi(JobRequestQueue):
log = logging.getLogger("zuul.MergerApi")
request_class = MergeRequest # type: ignore
request_class = MergeRequest
def __init__(self, client, merge_request_callback=None):
root = '/zuul/merger'