@@ -75,8 +75,6 @@ def format(session):
75
75
session .run ("black" , * SOURCE_FILES )
76
76
session .run ("python" , "utils/license-headers.py" , "fix" , * SOURCE_FILES )
77
77
78
- lint (session )
79
-
80
78
81
79
@nox .session ()
82
80
def lint (session ):
@@ -96,30 +94,28 @@ def lint(session):
96
94
97
95
session .install (".[async,requests,orjson,pyarrow,vectorstore_mmr]" , env = INSTALL_ENV )
98
96
99
- # Run mypy on the package and then the type examples separately for
100
- # the two different mypy use-cases, ourselves and our users.
101
- session .run ("mypy" , "--strict" , "--show-error-codes" , "elasticsearch/" )
102
- session .run (
103
- "mypy" ,
104
- "--strict" ,
105
- "--show-error-codes" ,
106
- "test_elasticsearch/test_types/sync_types.py" ,
107
- )
97
+ # Run mypy on the package, the type examples and the DSL examples
108
98
session .run (
109
99
"mypy" ,
110
100
"--strict" ,
101
+ "--implicit-reexport" ,
102
+ "--explicit-package-bases" ,
111
103
"--show-error-codes" ,
112
- "test_elasticsearch/test_types/async_types.py" ,
104
+ "--enable-error-code=ignore-without-code" ,
105
+ "elasticsearch/" ,
106
+ "test_elasticsearch/test_types/" ,
113
107
)
114
108
115
109
# Make sure we don't require aiohttp to be installed for users to
116
110
# receive type hint information from mypy.
117
111
session .run ("python" , "-m" , "pip" , "uninstall" , "--yes" , "aiohttp" )
118
- session .run ("mypy" , "--strict" , "--show-error-codes" , "elasticsearch/" )
119
112
session .run (
120
113
"mypy" ,
121
114
"--strict" ,
115
+ "--implicit-reexport" ,
116
+ "--explicit-package-bases" ,
122
117
"--show-error-codes" ,
118
+ "elasticsearch/" ,
123
119
"test_elasticsearch/test_types/sync_types.py" ,
124
120
)
125
121
0 commit comments