Fix latest set of lint errors.

This commit is contained in:
Jennifer Taylor 2025-08-14 01:43:17 +00:00
parent 7d7c582d2f
commit e55bd017e7
8 changed files with 0 additions and 31 deletions

View File

@ -32,8 +32,6 @@ def jsonify_response(data: Dict[str, Any], code: int = 200) -> Response:
@app.before_request
def before_request() -> None:
global config
g.config = config
g.data = Data(config)
g.authorized = False

View File

@ -3916,9 +3916,6 @@ class ByteCodeDecompiler(VerboseOutput):
return statement
def find_if_batches(statement: Statement) -> Optional[Statement]:
nonlocal batches
nonlocal processed
if isinstance(statement, IfStatement):
# Don't sum up statements already grabbed by a previous invocation.
if statement in processed:
@ -3972,7 +3969,6 @@ class ByteCodeDecompiler(VerboseOutput):
def replace_if_with_switch(statement: Statement) -> Optional[Statement]:
nonlocal changed
nonlocal batches
nonlocal processed
if isinstance(statement, IfStatement):
if statement not in processed:
@ -3990,9 +3986,6 @@ class ByteCodeDecompiler(VerboseOutput):
# First, make sure all the if entries are an equals.
def swap_not_equals(statement: Statement) -> Optional[Statement]:
nonlocal batch
nonlocal new_batch
if isinstance(statement, IfStatement):
if statement not in batch:
return statement
@ -4331,9 +4324,6 @@ class ByteCodeDecompiler(VerboseOutput):
# Gather gotos and labels and make sure they're balanced.
def gather_gotos_and_labels(statement: Statement) -> Optional[Statement]:
nonlocal gotos
nonlocal labels
if isinstance(statement, GotoStatement):
gotos.add(statement.location)
elif isinstance(statement, DefineLabelStatement):

View File

@ -38,8 +38,6 @@ FRONTEND_CACHE_BUST: str = "site.1.3.react.16.14"
@app.before_request
def before_request() -> None:
global config
g.cache = cache
g.config = config

View File

@ -9,12 +9,10 @@ from bemani.utils.config import (
def load_config(filename: str) -> None:
global config
base_load_config(filename, config)
def instantiate_cache(app: Any) -> None:
global config
base_instantiate_cache(config, app)

View File

@ -24,8 +24,6 @@ from bemani.utils.config import (
def register_blueprints() -> None:
global config
app.register_blueprint(account_pages)
app.register_blueprint(admin_pages)
app.register_blueprint(arcade_pages)
@ -52,18 +50,15 @@ def register_blueprints() -> None:
def register_games() -> None:
global config
base_register_games(config)
def load_config(filename: str) -> None:
global config
base_load_config(filename, config)
app.secret_key = config.secret_key
def instantiate_cache(app: Any) -> None:
global config
base_instantiate_cache(config, app)

View File

@ -1,5 +1,4 @@
import argparse
import os
from bemani.protocol import EAmuseProtocol

View File

@ -237,8 +237,6 @@ def receive_request(path: str) -> Response:
def load_proxy_config(filename: str) -> None:
global config
config_data = yaml.safe_load(open(filename))
if "pcbid" in config_data and config_data["pcbid"] is not None:
for pcbid in config_data["pcbid"]:
@ -248,8 +246,6 @@ def load_proxy_config(filename: str) -> None:
def load_config(filename: str) -> None:
global config
config_data = yaml.safe_load(open(filename))
config.update(
{

View File

@ -21,7 +21,6 @@ config = Config()
@app.route("/", defaults={"path": ""}, methods=["GET"])
@app.route("/<path:path>", methods=["GET"])
def receive_healthcheck(path: str) -> Response:
global config
redirect_uri = config.server.redirect
if redirect_uri is None:
# Return a standard status OKAY message.
@ -53,7 +52,6 @@ def receive_request(path: str) -> Response:
return Response("Unrecognized packet!", 500)
# Create and format config
global config
requestconfig = config.clone()
requestconfig["client"] = {
"address": remote_address or request.remote_addr,
@ -119,17 +117,14 @@ def receive_request(path: str) -> Response:
def register_games() -> None:
global config
base_register_games(config)
def load_config(filename: str) -> None:
global config
base_load_config(filename, config)
def instantiate_cache(app: Any) -> None:
global config
base_instantiate_cache(config, app)