Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mypy): 1/2 mypy complains about conflicting main.py modules if we do not use unique names for the sample modules #2025

Merged
merged 1 commit into from
Feb 18, 2025
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
23 changes: 12 additions & 11 deletions py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -154,19 +154,20 @@ mypy_path = [
"plugins/ollama/src",
"plugins/pinecone/src",
"plugins/vertex-ai/src",
"samples/basic-gemini",
"samples/coffee-shop",
"samples/context-caching",
"samples/flow-sample1",
"samples/hello",
"samples/menu",
"samples/prompt-file",
"samples/rag",
"samples/vertex-ai-model-garden",
"samples/vertex-ai-reranker",
"samples/vertex-ai-vector-search",
"samples/basic-gemini/src",
"samples/coffee-shop/src",
"samples/context-caching/src",
"samples/flow-sample1/src",
"samples/hello/src",
"samples/menu/src",
"samples/prompt-file/src",
"samples/rag/src",
"samples/vertex-ai-model-garden/src",
"samples/vertex-ai-reranker/src",
"samples/vertex-ai-vector-search/src",
]
namespace_packages = true
strict = true
warn_unused_configs = true

[tool.datamodel-codegen]
Expand Down
12 changes: 12 additions & 0 deletions py/samples/basic-gemini/src/basic-gemini.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2025 Google LLC
# SPDX-License-Identifier: Apache-2.0

"""A stub for the sample to come."""


def main() -> None:
print('Hey')


if __name__ == '__main__':
main()
65 changes: 0 additions & 65 deletions py/samples/coffee-shop/main.py

This file was deleted.

12 changes: 12 additions & 0 deletions py/samples/coffee-shop/src/coffee-shop.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2025 Google LLC
# SPDX-License-Identifier: Apache-2.0

"""A stub for the sample to come."""


def main() -> None:
print('Hey')


if __name__ == '__main__':
main()
65 changes: 0 additions & 65 deletions py/samples/context-caching/main.py

This file was deleted.

12 changes: 12 additions & 0 deletions py/samples/context-caching/src/context-caching.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2025 Google LLC
# SPDX-License-Identifier: Apache-2.0

"""A stub for the sample to come."""


def main() -> None:
print('Hey')


if __name__ == '__main__':
main()
65 changes: 0 additions & 65 deletions py/samples/flow-sample1/main.py

This file was deleted.

12 changes: 12 additions & 0 deletions py/samples/flow-sample1/src/flow-sample1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2025 Google LLC
# SPDX-License-Identifier: Apache-2.0

"""A stub for the sample to come."""


def main() -> None:
print('Hey')


if __name__ == '__main__':
main()
65 changes: 0 additions & 65 deletions py/samples/hello/main.py

This file was deleted.

File renamed without changes.
Loading
Loading