Skip to content
Merged
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 .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ jobs:
- name: Lint with ruff
run: uv run --directory py ruff check --select I .

- name: Type check with Ty
run: uv run --directory py ty check --exit-zero .

- name: Check licenses
run: ./bin/check_license

Expand Down
2 changes: 1 addition & 1 deletion bin/run_lint
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ PY_DIR="${TOP_DIR}/py"
JS_DIR="${TOP_DIR}/js"j

uv run --directory "${PY_DIR}" ruff check --select I --fix --preview --unsafe-fixes .
uv run --directory "${PY_DIR}" mypy .
uv run --directory "${PY_DIR}" ty check --exclude samples .

# Disabled because there are many lint errors.
#pushd "${GO_DIR}" &>/dev/null
Expand Down
4 changes: 2 additions & 2 deletions py/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ def lint(session: nox.Session) -> None:
session.run('uv', 'run', 'ruff', 'format', '--check', '.', external=True)
session.log('Running ruff checks')
session.run('uv', 'run', 'ruff', 'check', '--preview', '--unsafe-fixes', '--fix', '.', external=True)
# session.log("Running mypy checks") # mypy has many errors currently
# session.run("mypy", external=True)
session.log('Running Ty checks')
session.run('uv', 'run', 'ty', 'check', '.', external=True)
27 changes: 2 additions & 25 deletions py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ dev = [
"nox-uv>=0.2.2",
]

lint = ["mypy>=1.15", "ruff>=0.9"]
lint = ["ty>=0.0.1", "ruff>=0.9"]

[tool.hatch.build.targets.wheel]
packages = []
Expand Down Expand Up @@ -199,32 +199,9 @@ convention = "google"
docstring-code-format = true
docstring-code-line-length = 120
indent-style = "space"
line-ending = "lf"
quote-style = "single"
skip-magic-trailing-comma = false

# Static type checking.
[tool.mypy]
disallow_incomplete_defs = true
disallow_untyped_defs = true
exclude = ["samples/"]
explicit_package_bases = true
mypy_path = [
"packages/genkit/src",
"plugins/chroma/src",
"plugins/compat-oai/src",
"plugins/dev-local-vectorstore/src",
"plugins/firebase/src",
"plugins/flask/src",
"plugins/google-cloud/src",
"plugins/google-genai/src",
"plugins/ollama/src",
"plugins/pinecone/src",
"plugins/vertex-ai/src",
]
namespace_packages = true
strict = true
warn_unused_configs = true
line-ending = "lf"

[tool.datamodel-codegen]
#collapse-root-models = true # Don't use; produces Any as types.
Expand Down
68 changes: 27 additions & 41 deletions py/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading