summary refs log tree commit diff
path: root/.github/workflows
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-04-27 14:03:44 +0100
committerGitHub <noreply@github.com>2022-04-27 14:03:44 +0100
commit646324437543c096e737777c81b4fe4b45c3e1a7 (patch)
tree5320ddebe74982e1ff8ba427e45ef27135565699 /.github/workflows
parentConsistently use collections.abc.Mapping to check frozendict. (#12564) (diff)
downloadsynapse-646324437543c096e737777c81b4fe4b45c3e1a7.tar.xz
Remove unused `# type: ignore`s (#12531)
Over time we've begun to use newer versions of mypy, typeshed, stub
packages---and of course we've improved our own annotations. This makes
some type ignore comments no longer necessary. I have removed them.

There was one exception: a module that imports `select.epoll`. The
ignore is redundant on Linux, but I've kept it ignored for those of us
who work on the source tree using not-Linux. (#11771)

I'm more interested in the config line which enforces this. I want
unused ignores to be reported, because I think it's useful feedback when
annotating to know when you've fixed a problem you had to previously
ignore.

* Installing extras before typechecking

Lacking an easy way to install all extras generically, let's bite the bullet and
make install the hand-maintained `all` extra before typechecking.

Now that https://github.com/matrix-org/backend-meta/pull/6 is merged to
the release/v1 branch.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/tests.yml8
1 files changed, 2 insertions, 6 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index cad4cb6d77..efa35b71df 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -20,13 +20,9 @@ jobs:
       - run: scripts-dev/config-lint.sh
 
   lint:
-    # This does a vanilla `poetry install` - no extras. I'm slightly anxious
-    # that we might skip some typechecks on code that uses extras. However,
-    # I think the right way to fix this is to mark any extras needed for
-    # typechecking as development dependencies. To detect this, we ought to
-    # turn up mypy's strictness: disallow unknown imports and be accept fewer
-    # uses of `Any`.
     uses: "matrix-org/backend-meta/.github/workflows/python-poetry-ci.yml@v1"
+    with:
+      typechecking-extras: "all"
 
   lint-crlf:
     runs-on: ubuntu-latest