Skip to content

no error when subtyping string literal #16195

Open
@DetachHead

Description

@DetachHead
class Foo:
    pass


class Bar("Foo"): # no error, crashes at runtime
    pass

playground

TypeError: str() argument 'encoding' must be str, not tuple

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @DetachHead@AlexWaygood

        Issue actions

          no error when subtyping string literal · Issue #16195 · python/mypy