Skip to content

Commit b1a4e5b

Browse files
committed
consolidate mypy checks into linting
1 parent eb88bac commit b1a4e5b

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

sdks/python/setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def normalize_path(filename):
4949
return os.path.normcase(os.path.realpath(os.path.normpath(filename)))
5050

5151

52-
class mypy(Command):
52+
class pyrefly(Command):
5353
user_options = []
5454

5555
def initialize_options(self):
@@ -71,10 +71,10 @@ def get_project_path(self):
7171
return os.path.join(project_path, to_filename(ei_cmd.egg_name))
7272

7373
def run(self):
74-
args = ['mypy', self.get_project_path()]
74+
args = ['pyrefly', 'check', self.get_project_path()]
7575
result = subprocess.call(args)
7676
if result != 0:
77-
raise DistutilsError("mypy exited with status %d" % result)
77+
raise DistutilsError("pyrefly exited with status %d" % result)
7878

7979

8080
def get_version():
@@ -659,6 +659,6 @@ def get_portability_package_data():
659659
license='Apache License, Version 2.0',
660660
keywords=PACKAGE_KEYWORDS,
661661
cmdclass={
662-
'mypy': mypy,
662+
'pyrefly': pyrefly,
663663
},
664664
)

sdks/python/test-suites/tox/pycommon/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ check.dependsOn formatter
4141
toxTask "lint", "lint", "${posargs}"
4242
linter.dependsOn lint
4343

44-
toxTask "mypy", "mypy", "${posargs}"
45-
linter.dependsOn mypy
44+
// toxTask "mypy", "mypy", "${posargs}"
45+
// linter.dependsOn mypy

sdks/python/tox.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,16 @@ setenv =
194194
deps =
195195
ruff==0.15.7
196196
isort==7.0.0
197+
pyrefly==0.54.0
198+
dask==2022.01.0
199+
distributed==2022.01.0
200+
extras =
201+
gcp
197202
commands =
198203
ruff --version
199204
time {toxinidir}/scripts/run_pylint.sh
205+
pyrefly --version
206+
time python setup.py pyrefly
200207

201208
[testenv:whitespacelint]
202209
setenv =

0 commit comments

Comments
 (0)