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

Cleaning up deepsource complaints #2069

Merged
merged 1 commit into from
Apr 28, 2022
Merged
Show file tree
Hide file tree
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
17 changes: 0 additions & 17 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import os
import sys

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
Expand Down Expand Up @@ -258,17 +255,3 @@

# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False

# html_theme_options = {
# 'canonical_url': 'http://guake.readthedocs.io/en/latest/',
# 'logo_only': False,
# 'display_version': True,
# 'prev_next_buttons_location': 'bottom',
# 'style_external_links': False,
# 'vcs_pageview_mode': '',
# # Toc options
# 'collapse_navigation': True,
# 'sticky_navigation': True,
# 'navigation_depth': 4,
# 'titles_only': False
# }
4 changes: 0 additions & 4 deletions guake/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ def __init__(self):
dialog = self.get_widget("aboutdialog")

# images
# ipath = pixmapfile('guake-notification.png')
# img = gtk.gdk.pixbuf_new_from_file(ipath)

# img = pixmapfile('guake-notification.png')
image = Gtk.Image()
image.set_from_file(pixmapfile("guake-notification.png"))
pixbuf = image.get_pixbuf()
Expand Down
3 changes: 1 addition & 2 deletions guake/guake_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1290,8 +1290,7 @@ def search_on_web(self, *args):
search_query = guake_clipboard.wait_for_text()
search_query = quote_plus(search_query)
if search_query:
# TODO: search provider should be selectable (someone might
# prefer bing.com, the internet is a strange place ¯\_(ツ)_/¯ )
# TODO: search provider should be selectable.
search_url = f"https://www.google.com/search?q={search_query}&safe=off"
Gtk.show_uri(self.window.get_screen(), search_url, get_server_time(self.window))
return True
Expand Down
2 changes: 1 addition & 1 deletion guake/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ def main():
log.info("Calling startup script: %s", startup_script)
with subprocess.Popen(
[startup_script],
shell=True,
shell=False,
stdin=None,
stdout=None,
stderr=None,
Expand Down
2 changes: 0 additions & 2 deletions guake/simplegladeapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ def __init__(self, path, root=None, domain=None):
else:
self.main_widget = None

# self.glade = self.create_glade(self.glade_path, root, domain)

self.normalize_names()
# Widgets are loaded and can be refered as self.widget_name

Expand Down
5 changes: 0 additions & 5 deletions guake/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ def __init__(self, guake):
self.matched_value = ""
self.font_scale_index = 0
self._pid = None
# self.custom_bgcolor = None
# self.custom_fgcolor = None
self.found_link = None
self.uuid = uuid.uuid4()

Expand Down Expand Up @@ -313,8 +311,6 @@ def is_file_on_local_server(self, text) -> Tuple[Optional[Path], Optional[int],
py_func = m.group(2).strip()

def find_lineno(text, pt, lineno, py_func):
# print("text={!r}, pt={!r}, lineno={!r}, py_func={!r}".format(text,
# pt, lineno, py_func))
if lineno:
return lineno
if not py_func:
Expand Down Expand Up @@ -519,7 +515,6 @@ def decrease_font_size(self):
def kill(self):
pid = self.pid
threading.Thread(target=self.delete_shell, args=(pid,)).start()
# start_new_thread(self.delete_shell, (pid,))

def delete_shell(self, pid):
"""Kill the shell with SIGHUP
Expand Down
12 changes: 0 additions & 12 deletions guake/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,6 @@ def patch_gtk_theme(style_context, settings):
def rgba_to_hex(color):
return f"#{''.join(f'{int(i*255):02x}' for i in (color.red, color.green, color.blue))}"

# for n in [
# "inverted_bg_color",
# "inverted_fg_color",
# "selected_bg_color",
# "selected_fg_color",
# "theme_inverted_bg_color",
# "theme_inverted_fg_color",
# "theme_selected_bg_color",
# "theme_selected_fg_color",
# ]:
# s = style_context.lookup_color(n)
# print(n, s, rgba_to_hex(s[1]))
selected_fg_color = rgba_to_hex(style_context.lookup_color("theme_selected_fg_color")[1])
selected_bg_color = rgba_to_hex(style_context.lookup_color("theme_selected_bg_color")[1])
log.debug(
Expand Down