mirror of
https://github.com/DragonMinded/bemaniutils.git
synced 2026-08-15 15:03:47 -05:00
15 lines
365 B
Python
15 lines
365 B
Python
from typing import TypeVar
|
|
|
|
T = TypeVar("T")
|
|
|
|
|
|
def debugonly(func: T) -> T:
|
|
"""
|
|
A decorator that can be added to any handler function in a game backend
|
|
which will make it not possible to call in production mode, which is
|
|
when running this through uWSGI or another WSGI application.
|
|
"""
|
|
|
|
setattr(func, "__debug_only__", True)
|
|
return func
|