Skip to content

mypy AbstractMatchInfo has no attribute "route" #4748

Closed
@Dreamsorcerer

Description

When running mypy, I get the error:
error: "AbstractMatchInfo" has no attribute "route" [attr-defined]

From this code:

        match_info = await request.app.router.resolve(request_clone)
        if isinstance(match_info.route, web.ResourceRoute):

But, looking at the code, it looks to me like everything is actually returning a UrlMappingMatchInfo, which does have this attribute.

Would it make sense to just change the return to UrlMappingMatchInfo? I can't see why you would get another type returned from this function.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions