kopia lustrzana https://github.com/dgtlmoon/changedetection.io
Code - Tidy up lint errors (#3074)
rodzic
f689e5418e
commit
97291ce6d0
|
@ -19,7 +19,6 @@ from changedetectionio import store
|
|||
from changedetectionio.flask_app import changedetection_app
|
||||
from loguru import logger
|
||||
|
||||
|
||||
# Only global so we can access it in the signal handler
|
||||
app = None
|
||||
datastore = None
|
||||
|
@ -29,8 +28,6 @@ def get_version():
|
|||
|
||||
# Parent wrapper or OS sends us a SIGTERM/SIGINT, do everything required for a clean shutdown
|
||||
def sigshutdown_handler(_signo, _stack_frame):
|
||||
global app
|
||||
global datastore
|
||||
name = signal.Signals(_signo).name
|
||||
logger.critical(f'Shutdown: Got Signal - {name} ({_signo}), Saving DB to disk and calling shutdown')
|
||||
datastore.sync_to_json()
|
||||
|
|
|
@ -23,7 +23,6 @@ from loguru import logger
|
|||
browsersteps_sessions = {}
|
||||
io_interface_context = None
|
||||
import json
|
||||
import base64
|
||||
import hashlib
|
||||
from flask import Response
|
||||
|
||||
|
@ -34,10 +33,8 @@ def construct_blueprint(datastore: ChangeDetectionStore):
|
|||
from . import nonContext
|
||||
from . import browser_steps
|
||||
import time
|
||||
global browsersteps_sessions
|
||||
global io_interface_context
|
||||
|
||||
|
||||
# We keep the playwright session open for many minutes
|
||||
keepalive_seconds = int(os.getenv('BROWSERSTEPS_MINUTES_KEEPALIVE', 10)) * 60
|
||||
|
||||
|
@ -104,8 +101,6 @@ def construct_blueprint(datastore: ChangeDetectionStore):
|
|||
# A new session was requested, return sessionID
|
||||
|
||||
import uuid
|
||||
global browsersteps_sessions
|
||||
|
||||
browsersteps_session_id = str(uuid.uuid4())
|
||||
watch_uuid = request.args.get('uuid')
|
||||
|
||||
|
@ -149,7 +144,6 @@ def construct_blueprint(datastore: ChangeDetectionStore):
|
|||
def browsersteps_ui_update():
|
||||
import base64
|
||||
import playwright._impl._errors
|
||||
global browsersteps_sessions
|
||||
from changedetectionio.blueprint.browser_steps import browser_steps
|
||||
|
||||
remaining =0
|
||||
|
|
|
@ -25,7 +25,6 @@ def test_setup(live_server):
|
|||
|
||||
def get_last_message_from_smtp_server():
|
||||
import socket
|
||||
global smtp_test_server
|
||||
port = 11080 # socket server port number
|
||||
|
||||
client_socket = socket.socket() # instantiate
|
||||
|
@ -44,7 +43,6 @@ def test_check_notification_email_formats_default_HTML(client, live_server, meas
|
|||
# live_server_setup(live_server)
|
||||
set_original_response()
|
||||
|
||||
global smtp_test_server
|
||||
notification_url = f'mailto://changedetection@{smtp_test_server}:11025/?to=fff@home.com'
|
||||
|
||||
#####################
|
||||
|
@ -99,7 +97,6 @@ def test_check_notification_email_formats_default_Text_override_HTML(client, liv
|
|||
# https://github.com/caronc/apprise/issues/633
|
||||
|
||||
set_original_response()
|
||||
global smtp_test_server
|
||||
notification_url = f'mailto://changedetection@{smtp_test_server}:11025/?to=fff@home.com'
|
||||
notification_body = f"""<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
|
Ładowanie…
Reference in New Issue