Skip to content

pylint-django doesn't recognise ForeignKey models when using the to kwarg #223

Closed
@jadedarko

Description

@jadedarko

In addition to not recognising the model when it's supplied as a string, the following does not work

related = models.ForeignKey(to=Other, on_delete=models.SET_NULL)

the linter works as expected with

related = models.ForeignKey(Other, on_delete=models.SET_NULL)

Is it possible to allow kwarg usage? I prefer being explicit so that it's easy to find all references to a model.

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