cleder / crepr

Create a ❤️__repr__🤗️ for your python classes from the definition found in __init__
MIT License
6 stars 4 forks source link

Option to only add a __repr__ if none is present in the current source #56

Closed cleder closed 1 month ago

cleder commented 1 month ago

The current behaviour is to generate a __repr__ if it can be generated, regardless if the class currently has a __repr__ or not.

The add command should only generate a __repr__ if the class does not have one, Introduce an optional switch like --ignore-existing to add a __repr__ regardless.

cleder commented 1 month ago

To clarify: with --ignore-existing it will add a __repr__ to classes that do not have a __repr__ and skip the classes that do.