Adding a bunch of flake8 extensions and working through the errors

This commit is contained in:
Sumner Evans
2020-02-22 17:03:37 -07:00
parent 91c2f408b3
commit 2a0c480d4b
30 changed files with 1979 additions and 618 deletions

View File

@@ -1,3 +1,5 @@
from typing import Optional
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
@@ -5,12 +7,12 @@ from gi.repository import Gtk
class IconButton(Gtk.Button):
def __init__(
self,
icon_name,
relief=False,
icon_size=Gtk.IconSize.BUTTON,
label=None,
**kwargs,
self,
icon_name: Optional[str],
relief: bool = False,
icon_size: Gtk.IconSize = Gtk.IconSize.BUTTON,
label: str = None,
**kwargs,
):
Gtk.Button.__init__(self, **kwargs)
self.icon_size = icon_size
@@ -29,5 +31,5 @@ class IconButton(Gtk.Button):
self.add(box)
def set_icon(self, icon_name):
def set_icon(self, icon_name: str):
self.image.set_from_icon_name(icon_name, self.icon_size)