1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-01-17 08:48:05 +00:00

various minor changes to make pylint STFU

This commit is contained in:
checktheroads 2019-06-15 12:51:03 -07:00
parent eece919376
commit 9d5608d72e
3 changed files with 8 additions and 3 deletions

View file

@ -16,6 +16,9 @@
# I find this to be needlessly obtuse, and therefore log fstrings directly:
# logger.error(f"Error: {var1}, {var2}, {var3}")
# Perhaps this is "incorrect", but it works well and is more elegant, in my uneducated opinion.
#
# "duplicate-code" was disabled due to PyLint complaining about using the same logzero debug
# configuration in two files. Apparently having a consistent logging configuration is "bad".
[MASTER]
@ -154,7 +157,8 @@ disable=print-statement,
comprehension-escape,
bad-continuation,
cyclic-import,
logging-fstring-interpolation
logging-fstring-interpolation,
duplicate-code
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option

View file

@ -66,5 +66,6 @@ def worker_exit(server, worker): # pylint: disable=unused-argument
def on_exit(server):
"""Pre-shutdown Gunicorn Tasks"""
if os.path.exists(prometheus_multiproc_dir):
shutil.rmtree(prometheus_multiproc_dir)

View file

@ -127,10 +127,10 @@ def handle_500(e):
def clear_cache():
"""Function to clear the Flask-Caching cache"""
"""Function to clear the Redis cache"""
with app.app_context():
try:
cache.clear()
r_cache.flushdb()
except Exception as error_exception:
logger.error(f"Error clearing cache: {error_exception}")
raise