[tahoe-lafs-trac-stream] [Tahoe-LAFS] #3399: Evaluate adding mypy checks to code checks
Tahoe-LAFS
trac at tahoe-lafs.org
Mon Nov 23 18:45:49 UTC 2020
#3399: Evaluate adding mypy checks to code checks
-----------------------------+------------------------------
Reporter: jaraco | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Support Python 3
Component: unknown | Version: n/a
Resolution: | Keywords:
Launchpad Bug: |
-----------------------------+------------------------------
Comment (by jaraco):
Investigating in that issue, I learned quite a bit about how mypy works.
It seems that because Twisted isn't typed, it requires stubs to
effectively communicate its interfaces (and not trip up on the decorator
syntax). I ended up trying two approaches:
- [[https://github.com/jaraco/tahoe-
lafs/tree/3399.mypy.workaround|3399.mypy.workaround]] applies a clumsy but
effective workaround that addresses this one error.
- [[https://github.com/jaraco/tahoe-lafs/tree/3399.mypy.twisted-
stubs|3399.mypy.twisted-stubs]] creates twisted stubs, first from twisted
trunk, then from the latest stable. However, this approach creates many
more errors than it satisfies, probably because adding the stubs removes
the mask of errors from `ignore_missing_imports`.
Based on that, I'm going to try to proceed with addressing the type errors
without twisted stubs for now and see how far I can get without relying on
twisted stubs, a [[https://twistedmatrix.com/trac/ticket/9717|non-trivial
effort]].
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3399#comment:16>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list