Skip to content

Too broad return value for apps.get_model() #304

@yhoiseth

Description

@yhoiseth

When writing data migrations, you use apps.get_model() instead of the usual model imports.

However, PyCharm doesn't understand that the returned values are models:

Screenshot 2020-01-23 at 16 46 57

The problem is that get_model is set to return Type[Any]. I'll create a pull request to show what I mean.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions