Skip to content

Static type checker (Mypy) errors need to be fixed before it gets out of hand #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
senthurayyappan opened this issue Nov 4, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@senthurayyappan
Copy link
Member

Currently, there are around 10+ static type checker errors in the codebase. Addressing these now will prevent them from becoming a larger issue down the line.

Goals

  • Fix existing static type checker errors to bring the code to a clean, type-safe state.
  • Promote continuous code quality by ensuring type correctness, which will support maintainability and catch potential bugs early.

Suggested Actions

  • Identify and resolve each type error flagged by the checker.
@senthurayyappan senthurayyappan self-assigned this Nov 4, 2024
senthurayyappan added a commit that referenced this issue Nov 4, 2024
Fixes #7

Fix static type checker errors and add type annotations across multiple files.

* **onshape_api/connect.py**
  - Add type annotations to all functions and methods.
  - Fix type errors in `Client` class methods.
  - Ensure all imports are correctly typed.

* **onshape_api/data/preprocess.py**
  - Add type annotations to all functions.
  - Fix type errors in `extract_ids` and `get_assembly_df` functions.

* **onshape_api/graph.py**
  - Add type annotations to all functions.
  - Fix type inconsistencies in `create_graph` and `get_robot_link` functions.

* **onshape_api/log.py**
  - Add type annotations to all methods.
  - Fix type inconsistencies in `Logger` class methods.

* **onshape_api/models/assembly.py**
  - Add type annotations to all classes and methods.
  - Fix type issues in `PartInstance` and `AssemblyInstance` classes.

* **onshape_api/models/document.py**
  - Add type annotations to all classes and methods.
  - Fix type issues in `Document` and `DocumentMetaData` classes.

* **onshape_api/models/element.py**
  - Add type annotations to all classes and methods.
  - Fix type issues in `Element` class.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/imsenthur/onshape-api/issues/7?shareId=XXXX-XXXX-XXXX-XXXX).
@senthurayyappan senthurayyappan added the bug Something isn't working label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant