mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-09 13:35:01 +08:00
This commit is contained in:
@@ -38,3 +38,30 @@
|
||||
class MyModel(models.Model):
|
||||
user = models.ForeignKey('auth.User', on_delete=models.CASCADE)
|
||||
|
||||
- case: add_mypy_path_to_package_search
|
||||
main: |
|
||||
import extra_module
|
||||
mypy_config: |
|
||||
[mypy]
|
||||
mypy_path = ./extras
|
||||
[mypy.plugins.django-stubs]
|
||||
django_settings_module = mysettings
|
||||
files:
|
||||
- path: extras/extra_module.py
|
||||
content: |
|
||||
def extra_fn():
|
||||
pass
|
||||
|
||||
- case: add_mypypath_env_var_to_package_search
|
||||
main: |
|
||||
import extra_module
|
||||
mypy_config: |
|
||||
[mypy.plugins.django-stubs]
|
||||
django_settings_module = mysettings
|
||||
env:
|
||||
- MYPYPATH=./extras
|
||||
files:
|
||||
- path: extras/extra_module.py
|
||||
content: |
|
||||
def extra_fn():
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user