Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .github/workflows/mypy.yml

This file was deleted.

32 changes: 11 additions & 21 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ def lint(session):
)
session.run("flake8", "google", "tests")

"""Run type-checking."""
session.install(".[grpc,async_rest]", "mypy")
session.install(
"types-setuptools",
"types-requests",
"types-protobuf",
"types-dataclasses",
"types-mock; python_version=='3.7'",
)
session.run("mypy", "google", "tests")


@nox.session(python=DEFAULT_PYTHON_VERSION)
def blacken(session):
Expand Down Expand Up @@ -265,27 +276,6 @@ def lint_setup_py(session):
session.run("python", "setup.py", "check", "--restructuredtext", "--strict")


@nox.session(python=DEFAULT_PYTHON_VERSION)
def pytype(session):
"""Run type-checking."""
session.install(".[grpc]", "pytype")
session.run("pytype")


@nox.session(python=DEFAULT_PYTHON_VERSION)
def mypy(session):
"""Run type-checking."""
session.install(".[grpc,async_rest]", "mypy")
session.install(
"types-setuptools",
"types-requests",
"types-protobuf",
"types-dataclasses",
"types-mock; python_version=='3.7'",
)
session.run("mypy", "google", "tests")
Copy link
Contributor

@daniel-sanche daniel-sanche Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think there's value in being able to run mypy on its own sometimes.

It could be annoying to have to fix all other style issues, before even seeing if the types are valid

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. I'll keep mypy as a separate presubmit



@nox.session(python=DEFAULT_PYTHON_VERSION)
def cover(session):
"""Run the final coverage report.
Expand Down