Skip to content

Commit e11328d

Browse files
authored
Update search.py
1 parent 6a59897 commit e11328d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/arguments/search.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python
2-
import argparse
32
import webbrowser
43
from termcolor import colored
54
import sys as sys
@@ -42,7 +41,7 @@ def search_args(self):
4241
self.playbook_object.display_panel()
4342
elif self.arguments.new:
4443
url = "https://stackoverflow.com/questions/ask"
45-
if type(self.arguments.new) == str:
44+
if isinstance(self.arguments.new, str):
4645
webbrowser.open(f"{url}?title={self.arguments.new}")
4746
else:
4847
webbrowser.open(url)
@@ -91,4 +90,4 @@ def search_for_results(self, save=False):
9190
filename = SaveSearchResults(data)
9291
print(
9392
colored(f"\U0001F604 Answers successfully saved into {filename}",
94-
"green"))
93+
"green"))

0 commit comments

Comments
 (0)