Open dmerejkowsky opened 3 years ago
Something I noticed was that currently there are lots of places where .format(...)
is called. This makes it tricky to track down all the places where that is called and it is hard to know what replacement keys can be used.
What would you think if I approached this with a bit of a bigger change? My idea is to have a single class that is only in charge of formatting these templates. This class would know the keys & values that could be used and only needs to be given the specific format template. This would make it easy to handle these errors in a consistent way so that the CLI can display the message. It also would standardize the replacement keys that are available and make it easy to add new ones if needed. (Could also address #109 and make it easier to achieve #85.)
This would move a lot of things around since new_version
and current_version
are currently passed into a lot of different places. So I wouldn't want to dive into that if it would be something that would be unlikely to be merged. Thought?
So I wouldn't want to dive into that if it would be something that would be unlikely to be merged.
I think having a separate class is a really good idea -go for it ! We have plenty of tests so it's unlikely we get regressions - and even then we'll be able to fix them :)
Steps to reproduce:
tbump crashes with: