Skip to content

Fix type checking and linting issues#10

Merged
vvahidd merged 1 commit intomainfrom
fix-type-checking-and-linting
Feb 3, 2026
Merged

Fix type checking and linting issues#10
vvahidd merged 1 commit intomainfrom
fix-type-checking-and-linting

Conversation

@vvahidd
Copy link
Contributor

@vvahidd vvahidd commented Feb 3, 2026

Summary

  • Rename validate() to validate_config() on simulation classes to avoid conflict with Pydantic's built-in method
  • Rename type parameter to material_type in set_material() to avoid shadowing Python builtin
  • Add # type: ignore comments for duck-typed code patterns (e.g., after hasattr() checks)
  • Sort __all__ lists alphabetically per ruff I001
  • Flatten nested conditionals and convert loops to comprehensions
  • Add logger to viz.py for user feedback when not in notebook
  • Clean up notebooks (sequential cell IDs, remove empty cells)
  • Update tests for renamed methods

Breaking Changes

  • sim.validate()sim.validate_config()
  • sim.set_material("metal", type="conductor")sim.set_material("metal", material_type="conductor")

Test plan

  • Pre-commit hooks pass
  • Type checking passes
  • Run test suite

🤖 Generated with Claude Code

- Rename validate() to validate_config() to avoid Pydantic conflict
- Rename type parameter to material_type to avoid shadowing builtin
- Add type: ignore comments for duck-typed code patterns
- Sort __all__ lists alphabetically (ruff I001)
- Flatten nested conditionals and use comprehensions
- Add logger to viz.py for non-notebook feedback
- Clean up notebooks (cell IDs, remove empty cells)
- Update tests for renamed methods

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vvahidd vvahidd merged commit ebe9f7d into main Feb 3, 2026
4 of 5 checks passed
@vvahidd vvahidd deleted the fix-type-checking-and-linting branch February 3, 2026 13:37
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.

1 participant