Skip to content

--ignore-names-if-decorated-with still flags functions as unused #30

Description

@cberry31

When using the --ignore-names-if-decorated-with, or any flag that is --ignore-<>-if-decorated-with, deadcode will still flag the functions as unused.

pyproject.toml

[tool.deadcode]
exclude = [".venv"]
ignore-names-if-decorated-with = ["@app.route"]

service.py

@app.route("/", methods=["POST"])
def post_tax_adder_customer():
    pass

After running

deadcode .

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions