Skip to content

mypy error Class cannot subclass "Task" (has type "Any")  #14

Open
@philvarner

Description

@philvarner

I have code like:

class MyDatasetToStac(Task): 

That returns this error from mypy:

task.py:30: error: Class cannot subclass "Task" (has type "Any")  [misc]

The fix is to add:

class Sentinel2ToStac(Task): # type: ignore

However, it would be nice if stactask provided the correct type information so that this was not necessary.

Description of this general issue is here: https://stackoverflow.com/questions/49888155/class-cannot-subclass-qobject-has-type-any-using-mypy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions