#4115 new defect

typechecks fail on master

Reported by: meejah Owned by:
Priority: normal Milestone: undecided
Component: unknown Version: n/a
Keywords: Cc:
Launchpad Bug:

Description

Seems like Treq ("or something related") cause the typecheck job to fail on branches close to master:

check-untyped-defs  [annotation-unchecked]
src/allmydata/storage/http_client.py:437:18: error: Module "treq" is not valid
as a type  [valid-type]
        _treq: Union[treq, StubTreq, HTTPClient]
                     ^
src/allmydata/storage/http_client.py:437:18: note: Perhaps you meant to use a protocol matching the module structure?
src/allmydata/storage/http_client.py:546:26: error: Item "StubTreq" of
"Union[StubTreq, HTTPClient]" has no attribute "request"  [union-attr]
            response = await self._treq.request(
                             ^~~~~~~~~~~~~~~~~~
src/allmydata/client.py:687:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
src/allmydata/test/test_storage_http.py:719:13: error: "StubTreq" has no
attribute "request"  [attr-defined]
                client.request(
                ^~~~~~~~~~~~~~
Found 3 errors in 2 files (checked 294 source files)
typechecks: exit 1 (19.13 seconds) /root/project> mypy --python-version=3.8 src pid=231
.pkg: _exit> python /tmp/venv/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta
  typechecks: FAIL code 1 (61.79=setup[42.65]+cmd[19.13] seconds)
  evaluation failed :( (61.91 seconds)

Exited with code exit status 1

Change History (0)

Note: See TracTickets for help on using tickets.