hammer
hammer copied to clipboard
DRY version changes refactoring
There are cases where a tool version update changes one word to another across multiple commands and so a tool-specific API to enable reuse of these kind of switches might make sense.
For example:
self.get_area_option()
returns essentially this (currently not much longer expression):
"-rects" if (self.version() >= self.version_number("181")) else "-area"