Skip to content

[FEATURE] Ignore cookiecutter imports #242

@adam-grant-hendry

Description

@adam-grant-hendry

cookiecutter templates use jinja templating syntax in a python file to import the template package:

e.g.

import {{ cookiecutter\.project_slug }}

Even with a # nopycln: import, pycln errors when run because the above is invalid syntax in python:

SyntaxError: invalid syntax 'import {{ cookiecutter.project_slug }}'

Is there a way to completely ignore this line when parsing? My only other option at this point is to exclude the entire file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions