oscal-compass/compliance-trestle

fix make code-typing and make code-check errors

開放

#2,028 建立於 2026年1月8日

 (8 則留言) (0 個反應) (1 位負責人)Python (103 個分叉)auto 404
Epicevent/slamexempt-from-stalegood first issuehelp wantedpython

倉庫指標

星標
 (264 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Describe the bug

When developing, issuing make code-typing and make code-check result in errors.

To Reproduce

  • clone trestle repo
  • create & source venv
  • make develop
  • make code-typing
  • make code-check

Expected behavior

There should be fewer or no errors.

Screenshots / Logs.

((venv.allanilya) ) degenaro:trestle.allanilya$ make code-typing mypy --pretty trestle trestle/core/pipeline.py: note: In member "process" of class "Pipeline": trestle/core/pipeline.py:38: error: No overload variant of "get" of "classmethod" matches argument types "Filter", "type[Filter]" [call-overload] input_ = filter_.process(input_) ^~~~~~~~~~~~~~~ trestle/core/pipeline.py:38: note: Possible overload variants: trestle/core/pipeline.py:38: note: def get(self, Never, type[Never] | None = ..., /) -> Callable[[Any], Any] trestle/core/pipeline.py:38: note: def get(self, None, type[Never], /) -> Callable[[Any], Any] trestle/core/commands/command_docs.py:62: error: Unused "type: ignore" comment [unused-ignore] root = file_utils.extract_trestle_project_root(args.trestle_root) # type: ignore ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trestle/core/commands/command_docs.py:66: error: Unused "type: ignore" comment [unused-ignore] is_oscal_dir_valid = file_utils.check_oscal_directories(args.trestle_root) # type: ignore ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trestle/core/commands/command_docs.py:69: error: Unused "type: ignore" comment [unused-ignore] args.trestle_root = root # type: ignore ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Environment

  • OS: windows/linux
  • Python version: 3.9-12
  • Installed packages: trestle

貢獻者指南