Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit 754316e

Browse files
committed
Minor stylistic changes
This is basically merging in echonest#28 but without all of the whitespace changes. (which my editor also kept trying to make for me!)
1 parent c489b5d commit 754316e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

examples/try_new_things.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,9 @@ def end(self):
5959
def elem(self, name, value, attrs={ }):
6060
# delete attributes with an unset value
6161
for (k, v) in attrs.items():
62-
if v is None or v == '':
62+
if not v:
6363
del attrs[k]
64-
65-
if value is None or value == '':
64+
if not value:
6665
if len(attrs) == 0:
6766
return
6867
self._out.write(self._getIndention())

pyechonest/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,6 @@ def fix(x):
300300

301301

302302
def map_idspace(input_idspace):
303-
if input_idspace == 'spotify-WW' or input_idspace == 'spotifyv2-ZZ':
303+
if input_idspace in ['spotify-WW', 'spotifyv2-ZZ']:
304304
return 'spotify'
305305
return input_idspace

0 commit comments

Comments
 (0)