mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 22:37:44 +00:00
Use ruff linter to fix issues and provide consistent formatting
This commit is contained in:
+4
-4
@@ -5,7 +5,7 @@ import signal
|
||||
import sys
|
||||
|
||||
from core.cleanup import CLEANUP_TIMER
|
||||
from core.config import SERVER_OWNER_CALLSIGN, LOG_LEVEL
|
||||
from core.config import LOG_LEVEL, SERVER_OWNER_CALLSIGN
|
||||
from core.constants import SOFTWARE_VERSION
|
||||
from core.data_providers import DATA_PROVIDERS
|
||||
from core.data_store import DATA_STORE
|
||||
@@ -15,6 +15,7 @@ from server.webserver import WEB_SERVER
|
||||
# Globals
|
||||
run = True
|
||||
|
||||
|
||||
def shutdown(_signum=None, _frame=None):
|
||||
"""Shutdown function"""
|
||||
|
||||
@@ -29,7 +30,7 @@ def shutdown(_signum=None, _frame=None):
|
||||
|
||||
|
||||
# Main function
|
||||
if __name__ == '__main__':
|
||||
if __name__ == "__main__":
|
||||
# Set up logging
|
||||
root = logging.getLogger()
|
||||
root.setLevel(LOG_LEVEL)
|
||||
@@ -41,8 +42,7 @@ if __name__ == '__main__':
|
||||
root.addHandler(handler)
|
||||
|
||||
logging.info("Starting...")
|
||||
logging.info(
|
||||
f"This is Spothole version {SOFTWARE_VERSION}. This instance is run by {SERVER_OWNER_CALLSIGN}.")
|
||||
logging.info(f"This is Spothole version {SOFTWARE_VERSION}. This instance is run by {SERVER_OWNER_CALLSIGN}.")
|
||||
|
||||
# Shut down gracefully on SIGINT
|
||||
signal.signal(signal.SIGINT, shutdown)
|
||||
|
||||
Reference in New Issue
Block a user