mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
This enforces our use of a consistent style in how we access Python modules; "from os.path import dirname" is a particularly popular abbreviation inconsistent with our style, and so it deserves a lint rule. Commit message and error text tweaked by tabbott. Fixes #6543.
16 lines
392 B
Python
Executable File
16 lines
392 B
Python
Executable File
#!/usr/bin/env python3
|
|
from __future__ import absolute_import
|
|
from __future__ import print_function
|
|
|
|
import os
|
|
import sys
|
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
sys.path.append(BASE_DIR)
|
|
import scripts.lib.setup_path_on_import
|
|
|
|
os.environ['DJANGO_SETTINGS_MODULE'] = 'zproject.settings'
|
|
from django.conf import settings
|
|
|
|
print(getattr(settings, sys.argv[1]))
|