Adds a `set_footprint_type` MCP tool to set a placed footprint's placement type (through_hole / smd / unspecified) plus the optional exclude_from_pos_files / exclude_from_bom / not_in_schematic flags. These attributes gate inclusion in pick-and-place (.pos) exports and were previously unreachable: edit_component only handled reference/value/footprint and get_component_properties did not report the placement type at all. - python/commands/component.py: SWIG (pcbnew) handler via Set/GetAttributes + the dedicated exclusion setters; extends get_component_properties to report a human-readable `type` plus the three exclusion flags. - python/kicad_interface.py: IPC (kipy) handler setting attributes.mounting_style and the exclusion fields over the proto API with begin_commit/update_items/push_commit so changes are live in the KiCAD UI; registered in the command map, the IPC handler map, and the realtime/IPC whitelist; SWIG fallback on proto error. - src/tools/component.ts: tool registration with zod schema. - tests/test_set_footprint_type.py: 26 unit tests over both backends plus the extended get_component_properties response. - pyproject.toml: add `fitz` (PyMuPDF) to mypy ignore_missing_imports overrides; pre-existing gap that fails mypy on any edit to files importing it (board/view.py, kicad_interface.py). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
44 lines
703 B
TOML
44 lines
703 B
TOML
[project]
|
|
name = "kicad-mcp-server"
|
|
version = "2.1.0"
|
|
requires-python = ">=3.9"
|
|
|
|
[tool.black]
|
|
line-length = 100
|
|
target-version = ["py39"]
|
|
|
|
[tool.isort]
|
|
profile = "black"
|
|
line_length = 100
|
|
|
|
[tool.mypy]
|
|
python_version = "3.9"
|
|
warn_return_any = false
|
|
warn_unused_configs = true
|
|
check_untyped_defs = false
|
|
disallow_untyped_defs = false
|
|
explicit_package_bases = true
|
|
mypy_path = ".:python"
|
|
disable_error_code = [
|
|
"arg-type",
|
|
"attr-defined",
|
|
"union-attr",
|
|
"var-annotated",
|
|
"index",
|
|
]
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = [
|
|
"pcbnew",
|
|
"cairosvg",
|
|
"sexpdata",
|
|
"skip",
|
|
"fitz",
|
|
"kipy",
|
|
"kipy.*",
|
|
"schematic",
|
|
"PIL",
|
|
"PIL.*",
|
|
]
|
|
ignore_missing_imports = true
|