Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typechecking #53

Merged
merged 7 commits into from
Nov 24, 2023
Merged

Fix typechecking #53

merged 7 commits into from
Nov 24, 2023

Conversation

DMRobertson
Copy link
Contributor

@DMRobertson DMRobertson commented Nov 24, 2023

Fixes #52.

Commit messages have more details.

Drive-by fixes to remove twisted-related config, missed in #39.

David Robertson added 7 commits November 24, 2023 16:25
```
src/matrix_content_scanner/logutils.py:35: error: Unused "type: ignore" comment  [unused-ignore]
```

The paragraph starting

> This functionality can be used to inject your own values

in https://docs.python.org/3/library/logging.html#logging.LogRecord
seems to suggest our use is legitimate. Mypy things `record.request_id`
is Any, according to reveal_type.

Typeshed was changed to account for this in python/typeshed#7833
Annotations in iohttp got fixed in
aio-libs/aiohttp#7077, and we're now pulling
in a version with that fix.
This seems to be necessary after
aio-libs/aiohttp@1c9aba9

Confusingly this reverted to the concrete type in aiohttp's `master`
branch. Not sure what's going on there.
Missed in #39
@DMRobertson DMRobertson marked this pull request as ready for review November 24, 2023 16:29
@DMRobertson DMRobertson requested a review from a team as a code owner November 24, 2023 16:29
@DMRobertson
Copy link
Contributor Author

Thank youuuuu!

@DMRobertson DMRobertson merged commit 9915345 into main Nov 24, 2023
4 checks passed
@DMRobertson DMRobertson deleted the dmr/bump-mypy branch November 24, 2023 16:45
DMRobertson pushed a commit that referenced this pull request Nov 27, 2023
Fixes #46.

I am assuming that after media retention kicks in, the remote homeserver
responds to media requests with 404 M_NOT_FOUND. If so, the content
scanner should do the same.

Mypy should pass once #53 lands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mypy failing in CI
2 participants