Skip to content

Commit 2ea38e7

Browse files
committed
Clean up if statement
1 parent 0692e3d commit 2ea38e7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

manage.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ def main() -> None:
1010

1111
from django.conf import settings
1212

13-
if settings.DEBUG:
14-
if os.environ.get("RUN_MAIN") or os.environ.get("WERKZEUG_RUN_MAIN"):
15-
import debugpy
13+
if settings.DEBUG and os.environ.get("RUN_MAIN") or os.environ.get("WERKZEUG_RUN_MAIN"):
14+
import debugpy
1615

17-
# Use "nosec" inline comment to ignore security check because this doesn't run in production
18-
debugpy.listen(("0.0.0.0", 5678)) # nosec
19-
print("Debugpy attached!")
16+
# Use "nosec" inline comment to ignore security check because this doesn't run in production
17+
debugpy.listen(("0.0.0.0", 5678)) # nosec
18+
print("Debugpy attached!")
2019

2120
try:
2221
from django.core.management import execute_from_command_line

0 commit comments

Comments
 (0)