Skip to content

Commit 137d891

Browse files
committed
Fix formatting
1 parent b044707 commit 137d891

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

twitwi/normalizers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def grab_extra_meta(source, result, locale=None, source_version: str = "v1"):
206206
result["user_url"] = source["user"]["entities"]["url"]["urls"][0][
207207
"expanded_url"
208208
]
209-
except (KeyError, IndexError):
209+
except KeyError, IndexError:
210210
try:
211211
result["user_url"] = source["user"]["url"]
212212
except KeyError:
@@ -880,9 +880,9 @@ def normalize_tweets_payload_v2(
880880
already_seen = {}
881881

882882
## payload can contain just a single tweet
883-
if isinstance(payload["data"], (dict)):
883+
if isinstance(payload["data"], dict):
884884
items = [payload["data"]]
885-
elif isinstance(payload["data"], (list)):
885+
elif isinstance(payload["data"], list):
886886
items = payload["data"]
887887

888888
for item in items:

twitwi/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def validate_payload_v2(payload):
128128
return False
129129

130130
# there can also just be a single tweet in the payload
131-
if not isinstance(payload['data'], (list,dict)):
131+
if not isinstance(payload["data"], (list, dict)):
132132
return False
133133

134134
# NOTE: not sure it cannot be absent altogether

0 commit comments

Comments
 (0)