Skip to content

Fail to find NameError for undefined functions #1144

@kolokoltsov

Description

@kolokoltsov

Steps to reproduce

run pylint on code:

# coding=utf-8
print(calculate(1.01, 2))

def calculate(value1: int, value2: float) -> int:
    return (value1+value2)

Current behavior

Error is not issued.

Expected behavior

E: nn, nn: Undefined function 'calculate' (undefined-function)

pylint --version output

pylint.EXE 1.6.4,
astroid 1.4.8
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🪲C: used-before-assignmentIssues related to 'used-before-assignment' checkFalse Negative 🦋No message is emitted but something is wrong with the code

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions