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 #13708

Closed
github-actions bot opened this issue Sep 4, 2022 · 4 comments · Fixed by #13712
Closed

CI run against latest deps is failing #13708

github-actions bot opened this issue Sep 4, 2022 · 4 comments · Fixed by #13712
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. Z-Dev-Wishlist Makes developers' lives better, but doesn't have direct user impact

Comments

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2022

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

@DMRobertson
Copy link
Contributor

Run poetry run mypy
synapse/api/filtering.py:142: error: Value of type variable "_F" of function cannot be "Callable[[str], RoomID]"  [type-var]
synapse/api/filtering.py:147: error: Value of type variable "_F" of function cannot be "Callable[[str], UserID]"  [type-var]

@DMRobertson DMRobertson added S-Tolerable Minor significance, cosmetic issues, low or no impact to users. Z-Dev-Wishlist Makes developers' lives better, but doesn't have direct user impact O-Uncommon Most users are unlikely to come across this or unexpected workflow T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. labels Sep 5, 2022
@DMRobertson
Copy link
Contributor

Likely python/typeshed#8673

@DMRobertson
Copy link
Contributor

I think the functions decorated by cls_checks

@FormatChecker.cls_checks("matrix_room_id")
def matrix_room_id_validator(room_id_str: str) -> RoomID:
return RoomID.from_string(room_id_str)
@FormatChecker.cls_checks("matrix_user_id")
def matrix_user_id_validator(user_id_str: str) -> UserID:
return UserID.from_string(user_id_str)

are supposed to return a bool, judging by https://github.com/python/typeshed/pull/8673/files#diff-f5e2679481de689eab96a68a36277093752a2cfa26602b4ca82e1178b01a726fL5-R6

It's not clear to me if we actually use the return value e.g. to parse as well as validate?

@DMRobertson
Copy link
Contributor

See also python-jsonschema/jsonschema#958

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. Z-Dev-Wishlist Makes developers' lives better, but doesn't have direct user impact
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant