Skip to content

Commit 7a3c9c5

Browse files
authored
Remove unused DjangoContext creation (#433)
1 parent 77a28d6 commit 7a3c9c5

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

mypy_drf_plugin/main.py

-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
from typing import Callable, Dict, Optional, Type
22

33
from mypy.nodes import TypeInfo
4-
from mypy.options import Options
54
from mypy.plugin import ClassDefContext, Plugin
6-
from mypy_django_plugin.config import DjangoPluginConfig
7-
from mypy_django_plugin.django.context import DjangoContext
85

96
from mypy_drf_plugin.lib import fullnames, helpers
107
from mypy_drf_plugin.transformers import serializers
@@ -19,12 +16,6 @@ def transform_serializer_class(ctx: ClassDefContext) -> None:
1916

2017

2118
class NewSemanalDRFPlugin(Plugin):
22-
def __init__(self, options: Options) -> None:
23-
super().__init__(options)
24-
25-
django_settings_module = DjangoPluginConfig(options.config_file).django_settings_module
26-
self.django_context = DjangoContext(django_settings_module)
27-
2819
def _get_currently_defined_serializers(self) -> Dict[str, int]:
2920
base_serializer_sym = self.lookup_fully_qualified(fullnames.BASE_SERIALIZER_FULLNAME)
3021
if base_serializer_sym is not None and isinstance(base_serializer_sym.node, TypeInfo):

0 commit comments

Comments
 (0)