Skip to content

chore: Remove unused imports/variables and improve exception handling clarity#10

Closed
Copilot wants to merge 3 commits intodev_freefrom
copilot/sub-pr-7-another-one
Closed

chore: Remove unused imports/variables and improve exception handling clarity#10
Copilot wants to merge 3 commits intodev_freefrom
copilot/sub-pr-7-another-one

Conversation

Copy link

Copilot AI commented Jan 29, 2026

Addresses code review feedback from PR #7 by removing unused code and improving exception handling documentation.

Changes

Unused imports removed:

  • Test files: pytest, math, os from test modules that don't use them
  • Type hints: Dict, Any, field from modules that don't reference these types
  • Stdlib: dataclass, math, os where not needed

Unused variables removed:

  • scatter return values in api/report.py where plot objects weren't used

Exception handling improvements:

  • Added explanatory comments to bare pass statements in except blocks
  • Fixed variable shadowing where nested exception handlers reused e:
    except ImportError as e:
        # ... outer handling ...
        try:
            # ...
        except ImportError as e2:  # Changed from 'e'
            # ... inner handling ...

Test fixes:

  • Defined missing MAX_RESULTS = 5 constant in tests/test_design_builder.py
  • Removed unused imports from tests/test_mas_dataclasses.py (6 unused dataclass imports)

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 29, 2026 23:10
…pt clauses

Co-authored-by: tinix84 <16301528+tinix84@users.noreply.github.com>
Co-authored-by: tinix84 <16301528+tinix84@users.noreply.github.com>
Copilot AI changed the title [WIP] Add FREE version of PyOpenMagnetics with TAS format chore: Remove unused imports/variables and improve exception handling clarity Jan 29, 2026
Copilot AI requested a review from tinix84 January 29, 2026 23:16
@tinix84 tinix84 closed this Jan 30, 2026
@tinix84 tinix84 deleted the copilot/sub-pr-7-another-one branch January 30, 2026 06:34
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.

2 participants