Skip to content

Commit f42e4c7

Browse files
author
Rahul Saini
authored
updated f-strings & removed unnecessary else block.
1 parent 0832a01 commit f42e4c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ipinfo/details.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ def __getattr__(self, attr):
1414
"""Return attribute if it exists in details array, else return error."""
1515
if attr in self.details:
1616
return self.details[attr]
17-
else:
18-
raise AttributeError(
19-
"{} is not a valid attribute of Details".format(attr)
20-
)
17+
18+
raise AttributeError(
19+
f"{attr} is not a valid attribute of Details"
20+
)
2121

2222
@property
2323
def all(self):

0 commit comments

Comments
 (0)