PEP8 fixes
This commit is contained in:
parent
96a0862f1e
commit
68abd54571
|
@ -253,7 +253,7 @@ def search():
|
||||||
|
|
||||||
# Feature to display IP address
|
# Feature to display IP address
|
||||||
if search_util.check_kw_ip():
|
if search_util.check_kw_ip():
|
||||||
html_soup = bsoup(response,"html.parser")
|
html_soup = bsoup(response, "html.parser")
|
||||||
response = add_ip(html_soup, request.remote_addr)
|
response = add_ip(html_soup, request.remote_addr)
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
|
|
|
@ -141,11 +141,11 @@ def append_nojs(result: BeautifulSoup) -> None:
|
||||||
|
|
||||||
|
|
||||||
def add_ip(html_soup: BeautifulSoup, ip: str) -> BeautifulSoup:
|
def add_ip(html_soup: BeautifulSoup, ip: str) -> BeautifulSoup:
|
||||||
"""Adds the client's IP address to the search results if query contains keywords
|
"""Adds the client's IP address to the search results
|
||||||
|
if query contains keywords
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
query: Query of the client
|
html_soup: The parsed search result containing the keywords
|
||||||
response: The search result containing the keywords
|
|
||||||
ip: ip address of the client
|
ip: ip address of the client
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
|
@ -166,9 +166,6 @@ class Search:
|
||||||
def check_kw_ip(self) -> bool:
|
def check_kw_ip(self) -> bool:
|
||||||
"""Checks for keywords related to 'my ip' in the query
|
"""Checks for keywords related to 'my ip' in the query
|
||||||
|
|
||||||
Args:
|
|
||||||
query: Query of the client
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user