Skip to content
Draft
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
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ format: format_py format_scala format_md
type_check:
uv run mypy ${PYTHON_DIRS} --check-untyped-defs

ty_check:
uv run ty check ${PYTHON_DIRS}

lint_test: check_format assert_yaml_configs_parse
@echo "Lint checks pass!"

Expand Down
32 changes: 32 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ dev = [
{include-group = "test"},
{include-group = "typing-stubs"},
"pre-commit==3.3.2",
"ty>=0.0.17",
]
docs = [
"astroid==3.3.11", # Newer versions of astroid are not compatible with sphinx==7.4.7
Expand Down Expand Up @@ -283,3 +284,34 @@ exclude = [
remove-all-unused-imports = true
in-place = true
recursive = true

[tool.ty.environment]
python-version = "3.11"

[tool.ty.src]
include = [".github/scripts", "examples", "gigl", "tests", "snapchat", "scripts", "testing"]

[tool.ty.analysis]
# Equivalent to mypy's per-module ignore_missing_imports
allowed-unresolved-imports = [
"kfp.*",
"kfp_server_api.*",
"networkx.*",
"networkx",
"setuptools",
"tensorflow_data_validation",
"tensorflow_metadata.*",
"tensorflow.*",
"torch_geometric.*",
"tfx_bsl.*",
"parameterized.*",
"pyarrow.*",
"matplotlib.*",
"msgpack",
"torch_sparse.*",
"absl.*",
"graphlearn_torch.*",
"google.cloud.storage.*",
"torchrec.*",
"google_cloud_pipeline_components.*",
]