@@ -84,14 +84,17 @@ def format(session):
84
84
85
85
@nox .session ()
86
86
def lint (session ):
87
- session .install ("flake8" , "black~=24.0" , "mypy" , "isort" , "types-requests" )
87
+ # Check that importing the client still works without optional dependencies
88
+ session .install ("." , env = INSTALL_ENV )
89
+ session .run ("python" , "-c" , "from elasticsearch import Elasticsearch" )
90
+ session .run ("python" , "-c" , "from elasticsearch._otel import OpenTelemetry" )
88
91
92
+ session .install ("flake8" , "black~=24.0" , "mypy" , "isort" , "types-requests" )
89
93
session .run ("isort" , "--check" , "--profile=black" , * SOURCE_FILES )
90
94
session .run ("black" , "--check" , * SOURCE_FILES )
91
95
session .run ("flake8" , * SOURCE_FILES )
92
96
session .run ("python" , "utils/license-headers.py" , "check" , * SOURCE_FILES )
93
97
94
- # Workaround to make '-r' to still work despite uninstalling aiohttp below.
95
98
session .install (".[async,requests,orjson]" , env = INSTALL_ENV )
96
99
97
100
# Run mypy on the package and then the type examples separately for
0 commit comments