Skip to content

Commit 03be834

Browse files
Simplify lint and format nox sessions (#2790) (#2791)
(cherry picked from commit 4d5060b) Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
1 parent 1be0de9 commit 03be834

File tree

1 file changed

+2
-31
lines changed

1 file changed

+2
-31
lines changed

noxfile.py

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ def format(session):
7878
session.run("black", *SOURCE_FILES)
7979
session.run("python", "utils/license-headers.py", "fix", *SOURCE_FILES)
8080

81-
lint(session)
82-
8381

8482
@nox.session()
8583
def lint(session):
@@ -106,8 +104,7 @@ def lint(session):
106104

107105
session.install(".[async,requests,orjson,pyarrow,vectorstore_mmr]", env=INSTALL_ENV)
108106

109-
# Run mypy on the package and then the type examples separately for
110-
# the two different mypy use-cases, ourselves and our users.
107+
# Run mypy on the package, the type examples and the DSL examples
111108
session.run(
112109
"mypy",
113110
"--strict",
@@ -116,28 +113,7 @@ def lint(session):
116113
"--show-error-codes",
117114
"--enable-error-code=ignore-without-code",
118115
"elasticsearch/",
119-
)
120-
session.run(
121-
"mypy",
122-
"--strict",
123-
"--show-error-codes",
124-
"test_elasticsearch/test_types/sync_types.py",
125-
)
126-
session.run(
127-
"mypy",
128-
"--strict",
129-
"--show-error-codes",
130-
"test_elasticsearch/test_types/async_types.py",
131-
)
132-
133-
# check typing on the DSL examples
134-
session.run(
135-
"mypy",
136-
"--strict",
137-
"--implicit-reexport",
138-
"--explicit-package-bases",
139-
"--show-error-codes",
140-
"--enable-error-code=ignore-without-code",
116+
"test_elasticsearch/test_types/",
141117
"examples/dsl/",
142118
)
143119

@@ -151,11 +127,6 @@ def lint(session):
151127
"--explicit-package-bases",
152128
"--show-error-codes",
153129
"elasticsearch/",
154-
)
155-
session.run(
156-
"mypy",
157-
"--strict",
158-
"--show-error-codes",
159130
"test_elasticsearch/test_types/sync_types.py",
160131
)
161132

0 commit comments

Comments
 (0)