From e5a267ffbf9d42287279d74d34c10fab9a62c37b Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Wed, 3 Jun 2020 16:51:16 +0200 Subject: [PATCH] Fixed mypy config. --- dpaste/monkeytype.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/dpaste/monkeytype.py b/dpaste/monkeytype.py index 9623198..54e9aca 100644 --- a/dpaste/monkeytype.py +++ b/dpaste/monkeytype.py @@ -1,29 +1,16 @@ -import os from contextlib import contextmanager from typing import Iterator from monkeytype.config import DefaultConfig -class DpasteConfig(DefaultConfig): +class MyConfig(DefaultConfig): @contextmanager def cli_context(self, command: str) -> Iterator[None]: - """ - Django Settings setup - """ - try: - import dpaste.settings.local # isort: skip - - settings = "dpaste.settings.local" - except ImportError: - settings = "dpaste.settings.base" - - os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings) - import django # isort: skip django.setup() yield -CONFIG = DpasteConfig() +config = MyConfig()