libkeepass / pykeepass

Python library to interact with keepass databases (supports KDBX3 and KDBX4)
https://pypi.org/project/pykeepass/
GNU General Public License v3.0
411 stars 96 forks source link

[change] - entry.tags to return empty list instead of None? #391

Closed hicallmeal closed 4 months ago

hicallmeal commented 5 months ago

Hey there,

Hope not to overstep, but just in my usage, I found it a bit inconvenient that entry.tags returns None, if no tags are present. I feel like returning an empty list makes more sense.

Similarly to #175 , with entry.history

Could be done if this was changed to return val.replace(',', ';').split(';') if val else []

My usage involves searching for entries (via title / group / tags) then checking whether a different tag is present. `if 'nTag' in entry.tags'

If it's thought to be of merit, perhaps other properties should be looked at as well? (where a change like this would make sense)

Apologies, I'm not sure whether this would break anything, it's certainly a change that could affect users.

Evidlo commented 4 months ago

This makes sense to me. Heads up to @A6GibKm @janbrummer for a breaking change.

Evidlo commented 4 months ago

Fixed in master. To be released in 4.1.0