Skip to content

Control flow incorrect if imported functions have the same name #197

Open
@wchresta

Description

When there are two modules that expose a function with the same name, and those get imported directly (using aliases), the control flow is resolved incorrectly.

Example:
module_a.py

def foo():
    return 'module_a.foo'

module_b.py

def foo():
    return 'module_b.foo'

test.py

from module_a import foo as foo_a
from module_b import foo as foo_b

foo_a()
foo_b()

This will lead to a control flow that calls the function module_a.foo twice instead of once for each version.

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