This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Get synapse/ to pass mypy #11271
Copy link
Copy link
Open
Labels
O-UncommonMost users are unlikely to come across this or unexpected workflowMost users are unlikely to come across this or unexpected workflowS-MinorBlocks non-critical functionality, workarounds exist.Blocks non-critical functionality, workarounds exist.T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Z-Dev-WishlistMakes developers' lives better, but doesn't have direct user impactMakes developers' lives better, but doesn't have direct user impact
Description
Our mypy configuration currently includes an explicit enumeration of files to check. That list covers 409 of the 491 Python files in the synapse/
directory.
We should:
- Get as many of those to pass as possible
- Invert the selection criteria so that all files in
synapse/
are checked by default, while failing files are explicitly excluded.
As of 4249082, the omitted files are:
storage/databases/__init__.py
storage/databases/main/cache.py
storage/schema/*
(25 files)
We should probably start with switching from inclusion to exclusion, and burn down from there. Note that the next release of mypy will have significantly better syntax for multiple exclusions, but it's not out yet, so we'll have to get by with gnarlier regex-based syntax.
(Edited 2022-08-30 by dmr to reflect the status quo.)
Metadata
Metadata
Assignees
Labels
O-UncommonMost users are unlikely to come across this or unexpected workflowMost users are unlikely to come across this or unexpected workflowS-MinorBlocks non-critical functionality, workarounds exist.Blocks non-critical functionality, workarounds exist.T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Z-Dev-WishlistMakes developers' lives better, but doesn't have direct user impactMakes developers' lives better, but doesn't have direct user impact