← Back to issue list

Drop extraneous type checks

View original Github issue

Metadata

Project
craft-parts
Number
#1707
Type
issue
State
open
Author
mr-cal
Labels
Created
Updated
Closed

Current evaluation

Maintainer mr-cal requests removing redundant isinstance(data, dict) checks across craft-parts, added before strict type checking was enabled. 12 occurrences found. Issue is 4 days old with no maintainer response.

Suggested action: needs triage

Reason: This is a fresh issue (4 days old) from maintainer mr-cal with no labels, no assignee, and zero comments. While the request is clear—remove redundant isinstance(data, dict) checks that were added before strict type checking (PR #1294) gave them confidence in the type system—no maintainer has yet acknowledged or triaged it. The grep found ~12 occurrences across multiple files that would need review.

Impact: 35 Quick Win: 26.25 Staleness: 5 Complexity: 25 Confidence: 75 Support Request: 0

Issue body

### What needs to get done Remove the extraneous type checks, such as: https://github.com/canonical/craft-parts/blob/d8e891aeffb41f7a63d8d69ebba402c237fedad8/craft_parts/parts.py#L683-L684 ### Why it needs to get done These were added before we had confidence in our type-checking and can be removed to simplify the codebase.

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6
Impact: 35
Quick Win: 26.25
Staleness: 5
Complexity: 25
Confidence: 75
Support Request: 0
needs triage Maintainer mr-cal requests removing redundant isinstance(data, dict) checks across craft-parts, added before strict type checking was enabled. 12 occurrences found. Issue is 4 days old with no maintainer response.

Update history

Date Change
updated
created

Related work

  • Likely Fixed By: craft-parts#1294 (confidence 80%)

    PR #1294 enabled strict type checking with pyright, which is the reason these isinstance checks are now considered redundant and removable.

Related issues

No related issues found above the similarity threshold.