Skip to content

Commit

Permalink
Tiny scripts linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
C0rn3j committed Sep 28, 2024
1 parent f00d404 commit 067ca6b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 27 deletions.
55 changes: 31 additions & 24 deletions scripts/sc-controller
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
#!/usr/bin/env python3
import os, sys, signal
import os
import signal
import sys

def sigint(*a):
print("\n*break*")
sys.exit(0)

def main() -> None:
def sigint(*a):
print("\n*break*")
sys.exit(0)

if __name__ == "__main__":
signal.signal(signal.SIGINT, sigint)

import gi
gi.require_version('Gtk', '3.0')
gi.require_version('GdkX11', '3.0')
gi.require_version('Rsvg', '2.0')

from scc.paths import get_share_path
from scc.tools import init_logging
init_logging()

from gi.repository import Gtk, GObject
glades = os.path.join(get_share_path(), "glade")
images = os.path.join(get_share_path(), "images")
if Gtk.IconTheme.get_default():
Gtk.IconTheme.get_default().append_search_path(images)
#GObject.threads_init()

from scc.gui.app import App
App(glades, images).run(sys.argv)

if __name__ == "__main__":
signal.signal(signal.SIGINT, sigint)

import gi
gi.require_version('Gtk', '3.0')
gi.require_version('GdkX11', '3.0')
gi.require_version('Rsvg', '2.0')

from scc.tools import init_logging
from scc.paths import get_share_path
init_logging()

from gi.repository import Gtk, GObject
glades = os.path.join(get_share_path(), "glade")
images = os.path.join(get_share_path(), "images")
if Gtk.IconTheme.get_default():
Gtk.IconTheme.get_default().append_search_path(images)
#GObject.threads_init()

from scc.gui.app import App
App(glades, images).run(sys.argv)
main()
6 changes: 3 additions & 3 deletions scripts/scc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env python3
"""
Script that integrates everything SCC can do in one executable.
"""Script that integrates everything SCC can do in one executable.
Created so scc-* stuff doesn't polute /usr/bin.
"""
from scc.scripts import main

if __name__ == '__main__':
if __name__ == "__main__":
main()

0 comments on commit 067ca6b

Please sign in to comment.