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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN bash nodesource_setup.sh
RUN apt-get update && apt-get install -y jq nodejs
RUN corepack enable
RUN --mount=type=cache,target=/root/.cache/uv uv pip install --system coverage
RUN --mount=type=cache,target=/root/.cache/uv uv tool install codecov-cli --python 3.10
RUN --mount=type=cache,target=/root/.cache/uv uv tool install codecov-cli --python 3.13
RUN --mount=type=cache,target=/root/.cache/uv uv tool install pre-commit --with pre-commit-uv
WORKDIR /codegen-sdk
ENTRYPOINT [ "uv", "run", "--frozen", "/bin/bash"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
@skill(
canonical=True,
prompt="""Generate a Python codemod that updates type annotations from the old Union[x, y] syntax to the new x | y syntax for migration from Python 3.9 to
Python 3.10. The codemod should iterate through all files in a codebase, check for imports of Union from typing, and replace occurrences of Union in
Python 3.13. The codemod should iterate through all files in a codebase, check for imports of Union from typing, and replace occurrences of Union in
both generic type and subscript forms. Ensure that the new syntax is correctly formatted, handling cases with multiple types and removing any empty
strings from trailing commas.""",
uid="7637d11a-b907-4716-a09f-07776f81a359",
)
@canonical
class UpdateUnionTypes(Codemod, Skill):
"""This updates the Union [ x , y ] syntax for x | y for migrations for python 3.9 to python 3.10"""
"""This updates the Union [ x , y ] syntax for x | y for migrations for python 3.9 to python 3.13"""

language = ProgrammingLanguage.PYTHON

Expand Down
Loading