Skip to content

Commit

Permalink
Single-space
Browse files Browse the repository at this point in the history
  • Loading branch information
otsaloma committed Oct 8, 2023
1 parent e182556 commit ed95cdb
Show file tree
Hide file tree
Showing 24 changed files with 0 additions and 36 deletions.
1 change: 0 additions & 1 deletion nfoview/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from gi.repository import Gtk
from nfoview.i18n import _


class AboutDialog(Gtk.AboutDialog):

def __init__(self, parent):
Expand Down
2 changes: 0 additions & 2 deletions nfoview/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from gi.repository import GLib
from gi.repository import GObject


class Action(Gio.SimpleAction):

def __init__(self, name):
Expand All @@ -38,7 +37,6 @@ def update_enabled(self, window):
except nfoview.AffirmationError:
self.set_enabled(False)


class ToggleAction(Action):

# Gio's abstraction makes toggle action instantiation and
Expand Down
1 change: 0 additions & 1 deletion nfoview/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from gi.repository import GObject
from gi.repository import Gtk


class Application(Gtk.Application):

def __init__(self, paths):
Expand Down
1 change: 0 additions & 1 deletion nfoview/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"visited_link_color": "#215d9c",
}


class ConfigurationStore:

path = Path(nfoview.CONFIG_HOME_DIR) / "nfoview.conf"
Expand Down
1 change: 0 additions & 1 deletion nfoview/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.


class AffirmationError(Exception):

"""
Expand Down
1 change: 0 additions & 1 deletion nfoview/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from gi.repository import Gtk
from nfoview.i18n import _


# XXX: Gtk.FileChooserNative fails on GTK 4.10 with
# "The folder contents could not be displayed"
# "Operation was cancelled"
Expand Down
2 changes: 0 additions & 2 deletions nfoview/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@

_translation = gettext.NullTranslations()


# Wrapper class for marking lazy translations
class __(str): pass


def bind(localedir=nfoview.LOCALE_DIR):
with nfoview.util.silent(Exception):
# Set locale to the user's default setting.
Expand Down
1 change: 0 additions & 1 deletion nfoview/open.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from gi.repository import Gtk
from nfoview.i18n import _


# XXX: Gtk.FileChooserNative fails on GTK 4.10 with
# "The folder contents could not be displayed"
# "Operation was cancelled"
Expand Down
1 change: 0 additions & 1 deletion nfoview/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

from pathlib import Path


def get_config_home_directory():
if sys.platform == "win32":
return get_config_home_directory_windows()
Expand Down
2 changes: 0 additions & 2 deletions nfoview/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from gi.repository import Gtk
from nfoview.i18n import _


def boxwrap(widget):
# Needed to get widget natural-size left-aligned in grid.
box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=0)
Expand All @@ -34,7 +33,6 @@ def build_label(text):
label.set_xalign(1)
return label


class PreferencesDialog(Gtk.Dialog):

def __init__(self, parent):
Expand Down
9 changes: 0 additions & 9 deletions nfoview/schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"WhiteOnBlack",
)


class ColorScheme:

name = NotImplementedError
Expand All @@ -40,7 +39,6 @@ class ColorScheme:
link = NotImplementedError
visited_link = NotImplementedError


class BlackOnWhite(ColorScheme):

name = "black-on-white"
Expand All @@ -50,7 +48,6 @@ class BlackOnWhite(ColorScheme):
link = "#0000ff"
visited_link = "#ff00ff"


class Custom(ColorScheme):

name = "custom"
Expand All @@ -60,7 +57,6 @@ class Custom(ColorScheme):
link = nfoview.conf.link_color
visited_link = nfoview.conf.visited_link_color


class DarkGreyOnLightGray(ColorScheme):

name = "dark-grey-on-light-grey"
Expand All @@ -70,7 +66,6 @@ class DarkGreyOnLightGray(ColorScheme):
link = "#5555ff"
visited_link = "#ff55ff"


class Default(ColorScheme):

# https://github.com/GNOME/gtk/blob/main/gtk/theme/Default/_colors.scss
Expand All @@ -83,7 +78,6 @@ class Default(ColorScheme):
link = "#2a76c6"
visited_link = "#215d9c"


class GreyOnBlack(ColorScheme):

name = "grey-on-black"
Expand All @@ -93,7 +87,6 @@ class GreyOnBlack(ColorScheme):
link = "#aaaaff"
visited_link = "#ffaaff"


class LightGreyOnDarkGray(ColorScheme):

name = "light-grey-on-dark-grey"
Expand All @@ -103,7 +96,6 @@ class LightGreyOnDarkGray(ColorScheme):
link = "#aaaaff"
visited_link = "#ffaaff"


class WhiteOnBlack(ColorScheme):

name = "white-on-black"
Expand All @@ -113,7 +105,6 @@ class WhiteOnBlack(ColorScheme):
link = "#aaaaff"
visited_link = "#ffaaff"


def _ensure_translated():
for class_name in __all__:
scheme = globals()[class_name]
Expand Down
1 change: 0 additions & 1 deletion nfoview/test/test_about.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

from gi.repository import Gtk


class TestAboutDialog(nfoview.TestCase):

def run_dialog(self):
Expand Down
1 change: 0 additions & 1 deletion nfoview/test/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"visited_link_color": "#ffff00",
}


class TestConfigurationStore(nfoview.TestCase):

def setup_method(self, method):
Expand Down
1 change: 0 additions & 1 deletion nfoview/test/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

from gi.repository import Gtk


class TestExportImageDialog(nfoview.TestCase):

def run_dialog(self):
Expand Down
1 change: 0 additions & 1 deletion nfoview/test/test_open.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

from gi.repository import Gtk


class TestOpenDialog(nfoview.TestCase):

def run_dialog(self):
Expand Down
1 change: 0 additions & 1 deletion nfoview/test/test_preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from gi.repository import Gdk
from gi.repository import Gtk


class TestPreferencesDialog(nfoview.TestCase):

def run_dialog(self):
Expand Down
1 change: 0 additions & 1 deletion nfoview/test/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from gi.repository import Gtk
from unittest.mock import patch


class TestModule(nfoview.TestCase):

def test_affirm__false(self):
Expand Down
1 change: 0 additions & 1 deletion nfoview/test/test_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

from gi.repository import Gtk


class TestTextView(nfoview.TestCase):

def run_window(self):
Expand Down
1 change: 0 additions & 1 deletion nfoview/test/test_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import nfoview


class TestWindow(nfoview.TestCase):

def run_window(self):
Expand Down
1 change: 0 additions & 1 deletion nfoview/unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from gi.repository import GLib
from pathlib import Path


class TestCase:

def main_loop(self, window):
Expand Down
1 change: 0 additions & 1 deletion nfoview/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from gi.repository import Gtk
from gi.repository import Pango


def affirm(value):
if not value:
raise nfoview.AffirmationError(f"Not True: {value!r}")
Expand Down
1 change: 0 additions & 1 deletion nfoview/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from gi.repository import Gtk
from gi.repository import Pango


class TextView(Gtk.TextView):

def __init__(self):
Expand Down
1 change: 0 additions & 1 deletion nfoview/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from nfoview.i18n import _
from pathlib import Path


class Window(Gtk.ApplicationWindow):

def __init__(self, path=None):
Expand Down
2 changes: 0 additions & 2 deletions setup-partial.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from setuptools import setup
from setuptools.command.install_lib import install_lib


class InstallLib(install_lib):

def install(self):
Expand All @@ -29,7 +28,6 @@ def install(self):
path.write_text(text, "utf-8")
return install_lib.install(self)


def get_version(fm="nfoview/__init__.py"):
for line in Path(fm).read_text("utf-8").splitlines():
if line.startswith("__version__ = "):
Expand Down

0 comments on commit ed95cdb

Please sign in to comment.