Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rh0dium committed Jun 29, 2024
1 parent 25eff1a commit ae8e25e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions appsearch/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,9 @@ def get_searchable_field_choices(self, include_types=False): # noqa: E731
choices = map(lambda c: c + (self.get_field_classification(c[0]),), choices)

# Perform a sha hash on the ORM path to get something unique and obscured for the frontend
encode_value = lambda pair: (sha((",".join(pair[0])).encode("utf-8")).hexdigest(),) + tuple(
pair[1:]
) # noqa: E731
encode_value = lambda pair: ( # noqa: E731
(sha((",".join(pair[0])).encode("utf-8")).hexdigest(),) + tuple(pair[1:])
)
return map(encode_value, choices)

def reverse_field_hash(self, hash):
Expand Down
12 changes: 6 additions & 6 deletions demo_app/demo_app/settings_test.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# -*- coding: utf-8 -*-

import os
import warnings

from .settings import * # noqa: F403,F401

# Handle system warning as log messages
warnings.simplefilter("once")

for handler in LOGGING.get("handlers", []):
LOGGING["handlers"][handler]["level"] = "CRITICAL"
for logger in LOGGING.get("loggers", []):
LOGGING["loggers"][logger]["level"] = "CRITICAL"
for handler in LOGGING.get("handlers", []): # noqa: F405
LOGGING["handlers"][handler]["level"] = "CRITICAL" # noqa: F405
for logger in LOGGING.get("loggers", []): # noqa: F405
LOGGING["loggers"][logger]["level"] = "CRITICAL" # noqa: F405

mysql_db = DATABASES["default"]
mysql_db = DATABASES["default"] # noqa: F405
DEFAULT_DB = {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
Expand Down

0 comments on commit ae8e25e

Please sign in to comment.