Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Minor code refractoring. #7

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.idea
Pipfile
Pipfile.lock
11 changes: 5 additions & 6 deletions src/antergos-alerts.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/python
# -*- coding: utf-8 -*-
#!/bin/env python
#
# antergos-alerts.py
#
Expand Down Expand Up @@ -32,7 +31,7 @@
from termcolor import colored, cprint


class AntergosAlerts(object):
class AntergosAlerts:
""" Manages antergos alerts """
APP_NAME = 'ANTERGOS_NOTIFY'
LOCALE_DIR = '/usr/share/locale'
Expand Down Expand Up @@ -71,7 +70,7 @@ def __init__(self):

self.alert_ids = self.alerts.keys()

def run(self):
def run(self) -> None:
""" Runs program """
self.setup_gettext()

Expand All @@ -82,7 +81,7 @@ def run(self):
self.save_completed_alerts()

@staticmethod
def setup_gettext()-> None:
def setup_gettext() -> None:
""" Initialize gettext for string translations """
try:
gettext.textdomain(AntergosAlerts.APP_NAME)
Expand Down Expand Up @@ -205,7 +204,7 @@ def do_alerts(self) -> None:

self.completed_alert_ids.append(alert_id)

def save_completed_alerts(self):
def save_completed_alerts(self) -> None:
""" Store already shown alerts """
try:
with open(AntergosAlerts.COMPLETED_JSON, 'w') as json_data:
Expand Down