Skip to content

Wrong typehints for raw post/get methods of KeycloakOpenIDConnection #668

@Ujifman

Description

@Ujifman

After update I catched strange mypy errors

src\keycloak_migrator\keycloak_facade.py:89: error: Argument 1 to "raw_post" of "KeycloakOpenIDConnection" has incompatible type "str"; expected "list[Any]"  [arg-type]
src\keycloak_migrator\keycloak_facade.py:90: error: Argument "data" to "raw_post" of "KeycloakOpenIDConnection" has incompatible type "str"; expected "dict[Any, Any]"  [arg-type]       
src\keycloak_migrator\keycloak_facade.py:94: error: Argument 2 to "raise_error_from_response" has incompatible type "type[KeycloakPostError]"; expected "dict[Any, Any] | Exception"  [arg-type]
src\keycloak_migrator\keycloak_facade.py:306: error: Argument "audience" to "token" of "KeycloakOpenID" has incompatible type "str"; expected "dict[Any, Any]"  [arg-type]
Found 4 errors in 1 file (checked 37 source files)
Image

I think sombody made wrong typehints. args is tuple but not a list. But its really bad idea of typyhinting args/kwargs, as they are abstractions for passing params through, so there should not be typehints. What are the purpose of this typehinting?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions