mirror of
https://github.com/jazzband/django-configurations.git
synced 2026-05-03 21:24:46 +00:00
Add mypy plugin
This commit is contained in:
parent
7e473d0f9b
commit
146797f549
1 changed files with 15 additions and 0 deletions
15
configurations/mypy_plugin.py
Normal file
15
configurations/mypy_plugin.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from mypy.plugin import Options, Plugin
|
||||
|
||||
from configurations import importer
|
||||
|
||||
|
||||
class DjangoConfigurationsPlugin(Plugin):
|
||||
def __init__(self, options: Options) -> None:
|
||||
super().__init__(options)
|
||||
# Install settings so that they're available to other
|
||||
# mypy plugins called after this one
|
||||
importer.install()
|
||||
|
||||
|
||||
def plugin(version: str):
|
||||
return DjangoConfigurationsPlugin
|
||||
Loading…
Reference in a new issue