mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-06 12:14:28 +08:00
add missing plugin entrypoint, add plugins.ini mypy config with plugins specified
This commit is contained in:
@@ -9,3 +9,7 @@ class PostgresFieldsPlugin(Plugin):
|
||||
def get_base_class_hook(self, fullname: str
|
||||
):
|
||||
return determine_type_of_array_field
|
||||
|
||||
|
||||
def plugin(version):
|
||||
return PostgresFieldsPlugin
|
||||
|
||||
2
test/plugins.ini
Normal file
2
test/plugins.ini
Normal file
@@ -0,0 +1,2 @@
|
||||
[mypy]
|
||||
plugins = mypy_django_plugin.plugins.postgres_fields
|
||||
@@ -9,6 +9,7 @@ from mypy.test.helpers import assert_string_arrays_equal
|
||||
|
||||
ROOT_DIR = Path(__file__).parent.parent
|
||||
TEST_DATA_DIR = ROOT_DIR / 'test' / 'test-data'
|
||||
MYPY_INI_PATH = ROOT_DIR / 'test' / 'plugins.ini'
|
||||
|
||||
|
||||
class DjangoTestSuite(DataSuite):
|
||||
@@ -23,7 +24,8 @@ class DjangoTestSuite(DataSuite):
|
||||
|
||||
mypy_cmdline = [
|
||||
'--show-traceback',
|
||||
'--no-silence-site-packages'
|
||||
'--no-silence-site-packages',
|
||||
'--config-file={}'.format(MYPY_INI_PATH)
|
||||
]
|
||||
mypy_cmdline.append('--python-version={}'.format('.'.join(map(str,
|
||||
sys.version_info[:2]))))
|
||||
|
||||
Reference in New Issue
Block a user