Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

CI run against latest deps is failing #12996

Closed
github-actions bot opened this issue Jun 9, 2022 · 6 comments · Fixed by #12941
Closed

CI run against latest deps is failing #12996

github-actions bot opened this issue Jun 9, 2022 · 6 comments · Fixed by #12941
Labels
T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Comments

@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2022

See https://github.com/matrix-org/synapse/actions/runs/2493388697

@DMRobertson DMRobertson self-assigned this Jun 9, 2022
@DMRobertson
Copy link
Contributor

synapse/config/server.py:771: error: Unsupported operand types for + ("bytes" and "str")  [operator]

@DMRobertson
Copy link
Contributor

if listeners:
# comment out this block
unsecure_http_bindings = "#" + re.sub(
"\n {10}",
lambda match: match.group(0) + "#",
unsecure_http_bindings,
)

Not sure I understand what the error is here. Does mypy suddenly think that match.group(0) is a bytes?

@DMRobertson
Copy link
Contributor

The stubs on typeshed should select the first overload because "\n {10}": str, see https://github.com/python/typeshed/blob/master/stdlib/re.pyi#L136-L146

@DMRobertson
Copy link
Contributor

I can reproduce this after pip install mypy==0.961 mypy-zope==0.38 on top of the current poetry.lock.

@DMRobertson
Copy link
Contributor

I'm guessing we only saw this now because mypy-zope has just made a release supporting a version newer than mypy 0.950.

@DMRobertson
Copy link
Contributor

I think the line that's being complained about is due for removal in #12941. I'll assume that fixes this problem and let that PR close this issue. CI will open a new issue if my assumption is wrong!

@DMRobertson DMRobertson linked a pull request Jun 9, 2022 that will close this issue
@DMRobertson DMRobertson removed their assignment Jun 9, 2022
@erikjohnston erikjohnston added the T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. label Jun 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants