darrenburns / dunk

Prettier git diffs in the terminal 🎨
745 stars 15 forks source link

drop conflicting __version__ #4

Closed 1ace closed 2 years ago

1ace commented 2 years ago
>>> from importlib.metadata import version
>>> version('dunk')
'0.2.0a0'
>>> import dunk
>>> dunk.__version__
'0.1.0'

Let's remove the copy of this information that needs to be manually updated :slightly_smiling_face:

1ace commented 2 years ago

@darrenburns I see you've added this back in ed0cf62bc6730505d46b5623c3649a5d2eb6f7f9? It's your project, obviously you can do as you please, but I'm just surprised that you accepted this PR but then went back on it.

If you disagree with a PR someone send to your project, you should feel free to tell them "thanks for your contribution, but I don't want to do things this way" or similar; you're in charge :wink:

On the other hand, if this was added by accident (eg. by a pre-python3.7 tool), this can be a ping for you to notice this was mistakenly added back :slightly_smiling_face:

darrenburns commented 2 years ago

When I accepted your PR, __version__ was an unused variable so it made sense at the time.

It was added automatically by poetry, and I just hadn't deleted it yet.

The newer versions of dunk now display the version, so it needed to be added back.

The reason I don't use importlib.metadata is it's a 3.8+ feature, and dunk (currently) supports 3.7.