Skip to content

style: update typing#181

Merged
ktro2828 merged 2 commits into
mainfrom
style/typing
Aug 29, 2025
Merged

style: update typing#181
ktro2828 merged 2 commits into
mainfrom
style/typing

Conversation

@ktro2828

Copy link
Copy Markdown
Collaborator

What

This PR updates typing to ensure that the input is correct.

Copilot AI review requested due to automatic review settings August 29, 2025 06:59
@github-actions github-actions Bot added the refactor Refactoring code or increasing performance label Aug 29, 2025
@github-actions

github-actions Bot commented Aug 29, 2025

Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ❌

Overall Coverage

Lines Covered Coverage Threshold Status
2653 1836 69% 50% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
t4_devkit/dataclass/box.py 83% 🟢
t4_devkit/dataclass/trajectory.py 91% 🟢
t4_devkit/dataclass/transform.py 76% 🔴
t4_devkit/viewer/geography.py 53% 🔴
TOTAL 76% 🔴

updated for commit: ee52d8c by action🐍

@github-actions

Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ❌

Overall Coverage

Lines Covered Coverage Threshold Status
2653 1836 69% 50% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
t4_devkit/dataclass/box.py 83% 🟢
t4_devkit/dataclass/trajectory.py 91% 🟢
t4_devkit/dataclass/transform.py 76% 🔴
t4_devkit/viewer/geography.py 53% 🔴
TOTAL 76% 🔴

updated for commit: c70a801 by action🐍

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates type annotations and input handling to ensure proper type conversion and validation across the codebase. It introduces stronger typing by using specific Vector types and automatic conversion of input parameters.

  • Replaces generic tuple types with specific Vector2/Vector3 types for better type safety
  • Adds automatic type conversion using Vector constructors to handle various input formats
  • Introduces TYPE_CHECKING imports to avoid circular import issues

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
t4_devkit/viewer/geography.py Updates function signature to use Vector types and adds automatic conversion of inputs
t4_devkit/dataclass/transform.py Adds Vector3 conversion in translate operations and converts inputs in _format_transform_args
t4_devkit/dataclass/trajectory.py Adds Vector3 conversion for translation operations
t4_devkit/dataclass/box.py Adds Vector3 conversion for position translation
Comments suppressed due to low confidence (1)

t4_devkit/dataclass/transform.py:1

  • Inconsistent type conversion: arg0 (position) is not wrapped with Vector3() like other position parameters in this function. For consistency, it should be {\"position\": Vector3(arg0), \"rotation\": to_quaternion(kwargs[\"rotation\"])}.
from __future__ import annotations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread t4_devkit/dataclass/transform.py Outdated
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
@ktro2828 ktro2828 merged commit 0c8bcda into main Aug 29, 2025
4 of 5 checks passed
@ktro2828 ktro2828 deleted the style/typing branch August 29, 2025 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactoring code or increasing performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants