lilydjwg / nvchecker

New version checker for software releases
MIT License
425 stars 68 forks source link

Add all option to cmp #209

Closed trathborne closed 2 years ago

trathborne commented 2 years ago

It's also useful to be able to report packages without a changed version!

Now displaying both versions in green with == instead of an arrow.

lilydjwg commented 2 years ago

There is a conflict here now. Could you resolve it?

trathborne commented 2 years ago

I resolved the conflict and handled the cases of only one of oldver/newver being None, though I'm not sure all of those will ever happen. This is a bit more change than I wanted just to add --all but I think distinguishing all of these cases could be useful for automation using nvchecker.

trathborne commented 2 years ago

Hmm, and maybe the part at the end which picks the arrow symbol and the color could be a dictionary lookup?

lilydjwg commented 2 years ago

The updated code doesn't look right. It always shows all versions and with a == symbol.

lilydjwg commented 2 years ago

which picks the arrow symbol and the color could be a dictionary lookup?

Yes, it'll look better.

trathborne commented 2 years ago

Haha it's a typo, if in the middle of the if..elif..elif..if..elif ... dictionary version coming right up!

trathborne commented 2 years ago

Dammit still buggy

trathborne commented 2 years ago

Ok now I think that's right. My mistake for coding before coffee!

trathborne commented 2 years ago

mypy is being pedantic. We know that the diff is going to have a 'delta'. Should that be diffstyles[diff.get('delta', 'equal')] to make mypy shut up?

trathborne commented 2 years ago

Any idea what will make mypy happy?

lilydjwg commented 2 years ago

When I can't make mypy happy and am sure my code is correct, I just tell mypy to shut up :-)