@@ -75,8 +75,6 @@ def format(session):
7575 session .run ("black" , * SOURCE_FILES )
7676 session .run ("python" , "utils/license-headers.py" , "fix" , * SOURCE_FILES )
7777
78- lint (session )
79-
8078
8179@nox .session ()
8280def lint (session ):
@@ -96,30 +94,28 @@ def lint(session):
9694
9795 session .install (".[async,requests,orjson,pyarrow,vectorstore_mmr]" , env = INSTALL_ENV )
9896
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
10898 session .run (
10999 "mypy" ,
110100 "--strict" ,
101+ "--implicit-reexport" ,
102+ "--explicit-package-bases" ,
111103 "--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/" ,
113107 )
114108
115109 # Make sure we don't require aiohttp to be installed for users to
116110 # receive type hint information from mypy.
117111 session .run ("python" , "-m" , "pip" , "uninstall" , "--yes" , "aiohttp" )
118- session .run ("mypy" , "--strict" , "--show-error-codes" , "elasticsearch/" )
119112 session .run (
120113 "mypy" ,
121114 "--strict" ,
115+ "--implicit-reexport" ,
116+ "--explicit-package-bases" ,
122117 "--show-error-codes" ,
118+ "elasticsearch/" ,
123119 "test_elasticsearch/test_types/sync_types.py" ,
124120 )
125121
0 commit comments