Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings in rebound.py #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions rebound/rebound.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def souper(url):
"Please check that you are connected to the internet.\n", END))
sys.exit(1)

if re.search("\.com/nocaptcha", html.url): # URL is a captcha page
if re.search(r'\.com/nocaptcha', html.url): # URL is a captcha page
return None
else:
return BeautifulSoup(html.text, "html.parser")
Expand Down Expand Up @@ -389,7 +389,7 @@ def render(self, size, focus=False):

# Disable cursor display if cursor is outside of visible canvas parts
if canv.cursor is not None:
curscol, cursrow = canv.cursor
_, cursrow = canv.cursor
if cursrow >= maxrow or cursrow < 0:
canv.cursor = None

Expand Down Expand Up @@ -447,7 +447,7 @@ def _adjust_trim_top(self, canv, size):
action = self._scroll_action
self._scroll_action = None

maxcol, maxrow = size
_, maxrow = size
trim_top = self._trim_top
canv_rows = canv.rows()

Expand Down Expand Up @@ -479,7 +479,7 @@ def ensure_bounds(new_trim_top):

if self._old_cursor_coords is not None and self._old_cursor_coords != canv.cursor:
self._old_cursor_coords = None
curscol, cursrow = canv.cursor
_, cursrow = canv.cursor
if cursrow < self._trim_top:
self._trim_top = cursrow
elif cursrow >= self._trim_top + maxrow:
Expand Down Expand Up @@ -771,7 +771,7 @@ def _handle_input(self, input):


def _get_selected_link(self):
focus_widget, idx = self.content_container.get_focus() # Gets selected item
focus_widget, _ = self.content_container.get_focus() # Gets selected item
title = focus_widget.base_widget.text

for result in self.search_results:
Expand Down