How to use the pysnooper.tracer.DISABLED function in PySnooper

To help you get started, we’ve selected a few PySnooper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github koxudaxi / datamodel-code-generator / datamodel_code_generator / __init__.py View on Github external
import pysnooper
import yaml

from .format import PythonVersion
from .model.pydantic import (
    BaseModel,
    CustomRootType,
    DataModelField,
    dump_resolve_reference_action,
)
from .parser.base import Parser
from .version import version as __version__

T = TypeVar('T')

pysnooper.tracer.DISABLED = True

DEFAULT_BASE_CLASS: str = 'pydantic.BaseModel'


def enable_debug_message() -> None:  # pragma: no cover
    pysnooper.tracer.DISABLED = False


def snooper_to_methods(  # type: ignore
    output=None,
    watch=(),
    watch_explode=(),
    depth=1,
    prefix='',
    overwrite=False,
    thread_info=False,
github koxudaxi / datamodel-code-generator / datamodel_code_generator / __init__.py View on Github external
def enable_debug_message() -> None:  # pragma: no cover
    pysnooper.tracer.DISABLED = False