-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |