Closed wheaties closed 9 years ago
Thanks! I wrote that function ages ago for a perceived use, but I don't think I used it anywhere. Initially I was going to check that the ID was valid before posting, but decided that I'd just trust that no one is going to modify IDs themselves anyway. I think I'd rather just delete the method altogether.
Deleting the function aside, wouldn't you want to return int(id_) >= 1
, since previously you would return False
if int(id_) < 1
?
if condition: return False
---> return not condition
lol
You are correct @Cawb07 . But I'm going to remove this function in the next update anyway: I can confirm it's dead code, and I don't want that functionality anyway.
$ ag valid_id
terminalone/entity.py
136: def _valid_id(id_):
$
Couldn't help myself. That
_valid_id
, no point checking a boolean to then return the value of that boolean. Just return the boolean!