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:
parent
c8ea9be2be
commit
f718b16844
5
tox.ini
5
tox.ini
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue