Skip to content

Allow overwriting existing properties script #1591

@joelostblom

Description

@joelostblom

The create_properties_script function currently does not allow overwriting of the existing file. I think it could be useful to add an argument for this (e.g. overwrite_existing=True) to be able to get the template back without manually deleting the file (at least it would make things easier in the docs to avoid something going wrong when people manually delete their file).

def create_properties_script(path: Path | None = None) -> Path:
"""Create a properties script with default values.
If the script already exists, it will not be overwritten.
Args:
path: The path to the package folder. Defaults to the current working directory.
Returns:
The path to the newly created properties script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions