Skip to content

[Feature Request] Error/warning when function name is duplicated in code #557

Open
@j-steve

Description

@j-steve

One of the most frequent + annoying issues I've had when developing in PyScript is that sometimes I'll accidentally duplicate the name of a function in code, often from copying a function to make a second slightly different version. When this occurs, there's no errors in the code, but one of the functions will never trigger regardless of its trigger decorators.

I thought perhaps this was just a "me" problem but I saw another user mentioned this issue.

TLDR; it would be great if PyScript was able to throw an error/warning if it detected repeated top-level function names in a Python file.

(I'm not sure how feasible this would be or whether it is beyond the scope of the PyScript project, feel free to close this FR if so.)

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