Skip to content

Change sc.Set base class to typing.Set #195

@osoken

Description

@osoken

Because return types of KeysView.__or__ and other operators are typiiing.Set, returning sc.Set violates Liskov substitution principle because a base class of sc.Set is MutableSet (Set > MutableSet > AbstractSet).
I'm not sure if I should change the base class of sc.Set to typing.Set.

With this change, we'll be able to get rid of the # type: ignore[override]'s in sc.KeysView.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions