Skip to content

[K-005] core: _dataclass 헬퍼 중복 제거 (#287)#295

Merged
yeongseon merged 1 commit into
mainfrom
fix/issue-287-dataclass-helper-dedup
Jul 3, 2026
Merged

[K-005] core: _dataclass 헬퍼 중복 제거 (#287)#295
yeongseon merged 1 commit into
mainfrom
fix/issue-287-dataclass-helper-dedup

Conversation

@yeongseon

Copy link
Copy Markdown
Owner

요약

core/capability.pycore/models.py_dataclass 헬퍼 함수가 동일하게 두 벌 정의되어 있던 문제를 수정합니다.

변경 내용

capability.py

  • _dataclass 내부 _decorate 반환에 # pyright: ignore[reportCallIssue] 주석 추가 (models.py 버전과 통일)

models.py

  • _dataclass 함수 정의 제거
  • capability.py에서 _dataclass import로 교체
  • 더 이상 불필요한 import 제거: dataclasses.dataclass as _stdlib_dataclass, typing.TypeVar, typing_extensions.dataclass_transform, collections.abc.Callable

검증

  • ruff check 통과
  • mypy 통과
  • pytest tests/unit/ → 766/766 통과

Closes #287

_dataclass was defined identically in both core/capability.py and
core/models.py. Canonicalize in capability.py (adding the pyright
ignore comment from the models.py version) and import it into
models.py, removing the now-unused dataclass/TypeVar/dataclass_transform
imports.

Closes #287
@yeongseon yeongseon merged commit 26ea560 into main Jul 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[K-005][P2] capability.py와 models.py에 _dataclass 헬퍼 중복 정의

1 participant