Skip to content

cmath.exp(1j) generates diagnostics for general type issue. #1679

@gyu-don

Description

@gyu-don

Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues.

Describe the bug

cmath.exp(1j) generates general type issues

Argument of type "complex" cannot be assigned to parameter "__z" of type "_C" in function "exp"
  Type "complex" cannot be assigned to type "_C"
    "__float__" is not present
    "__complex__" is not present

Screenshot_20210323_183208

To Reproduce
Write following codes on VS Code.

import cmath
cmath.exp(1j)

Expected behavior
Don't generates this diagnostics because it's valid code.

VS Code extension or command-line
VS Code extension, Ver. 1.1.124

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