Skip to content

Incorrect parameters for check_type function from typeguard #437

Closed
@KnightCoder

Description

@KnightCoder

Issue description:
As the first parameter passed to the check_type function from typeguard package is unexpected, the execution breaks with the following TypeError:
TypeError: check_type() takes 2 positional arguments but 3 were given

Check the incorrect line of code here:

check_type("value", value, data_type)

More reference:
Typeguard API reference doc: https://typeguard.readthedocs.io/en/latest/api.html#typeguard.check_type

Suggested correction:
Instead, the code must have been:
check_type(value, data_type)

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