Skip to content

Commit

Permalink
debugging module
Browse files Browse the repository at this point in the history
  • Loading branch information
s-m-e committed Feb 6, 2022
1 parent 6262346 commit 117292b
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/scherbelberg/_core/debug.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-

"""
SCHERBELBERG
HPC cluster deployment and management for the Hetzner Cloud
https://github.com/pleiszenburg/scherbelberg
src/scherbelberg/_core/debug.py: Debugging
Copyright (C) 2021-2022 Sebastian M. Ernst <[email protected]>
<LICENSE_BLOCK>
The contents of this file are subject to the BSD 3-Clause License
("License"). You may not use this file except in
compliance with the License. You may obtain a copy of the License at
https://github.com/pleiszenburg/scherbelberg/blob/master/LICENSE
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
specific language governing rights and limitations under the License.
</LICENSE_BLOCK>
"""

# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# IMPORT
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

import os
import warnings

if os.environ.get('SCHERBELBERG_DEBUG', '0') == '1':
DEBUG = True
from typeguard import typechecked
warnings.warn("running in debug mode with activated run-time type checks", RuntimeWarning)
else:
DEBUG = False
typechecked = lambda x: x

0 comments on commit 117292b

Please sign in to comment.