Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(dev): Allow mypy to run in VS Code extension #21891

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions posthog/settings/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,9 @@
if not DEBUG and not TEST and SECRET_KEY == DEFAULT_SECRET_KEY:
logger.critical(
"""
You are using the default SECRET_KEY in a production environment!
For the safety of your instance, you must generate and set a unique key.,
More information on
https://posthog.com/docs/self-host/configure/securing-posthog,
"""
You are using the default SECRET_KEY in a production environment!
For the safety of your instance, you must generate and set a unique key.
"""
)
sys.exit("[ERROR] Default SECRET_KEY in production. Stopping Django server…\n")

Expand Down
2 changes: 1 addition & 1 deletion posthog/settings/overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
if runner:
cmd = sys.argv[1] if len(sys.argv) >= 2 else None

if cmd == "test" or runner.endswith("pytest") or runner.endswith("mypy"):
if cmd == "test" or runner.endswith("pytest") or runner.endswith("mypy") or "/mypy/" in runner:
print("Running in test mode. Setting DEBUG and TEST environment variables.")
os.environ["DEBUG"] = "1"
os.environ["TEST"] = "1"
Loading