[tahoe-lafs-trac-stream] [Tahoe-LAFS] #4115: typechecks fail on master
Tahoe-LAFS
trac at tahoe-lafs.org
Tue Oct 1 22:31:17 UTC 2024
#4115: typechecks fail on master
---------------------+---------------------------
Reporter: meejah | Owner:
Type: defect | Status: new
Priority: normal | Milestone: undecided
Component: unknown | Version: n/a
Keywords: | Launchpad Bug:
---------------------+---------------------------
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
}}}
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/4115>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list