Skip to content

Type Mismatch Error: Expected type Cache, got StaticCache instead #52

@luoshuijs

Description

@luoshuijs

Description

I encountered a type error.

20230906102735

Upon reviewing the code, I found that StaticCache doesn't inherit from Cache. This seems to be the root cause of the type mismatch.

Fix

class Cache:
    # ... Cache methods and properties ...

class StaticCache(Cache):
    # ... StaticCache methods and properties ...

This will make StaticCache a subclass of Cache and should resolve the type mismatch.

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