Skip to content

Conversation

@molshape
Copy link
Owner

This pull request introduces several improvements to the codebase, focusing on code quality, type safety, and workflow enhancements. The most notable changes include stricter type annotations and error handling in the CAS class, the addition of a type stub file for better static analysis, and updates to the CI workflow to include type checking and improved dependency management.

Code quality and type safety improvements:

  • Updated the CAS class methods (__format__, __eq__, and __lt__) to use more precise type annotations (object instead of CAS for comparison methods), added docstrings for clarity, and improved error handling when comparing objects of different types.
  • Added a new type stub file casregnum.pyi that provides explicit type signatures for all public methods and properties of the CAS class, enhancing static type checking and editor support.

Continuous Integration and dependency management:

  • Enhanced the GitHub Actions CI workflow by renaming jobs for clarity (testcode-tests, lintcode-quality), running tests using configuration from pyproject.toml, and adding a step for mypy type checking. [1] [2] [3]
  • Updated development dependencies in pyproject.toml to specify minimum versions, added mypy, and moved test coverage options into the pytest configuration for consistency. [1] [2]

Version update:

  • Bumped the package version from 1.1.1 to 1.1.2 to reflect these improvements.

- Add `mypy` type checking to CI pipeline (`ci.yml`)
- Rename `lint` job to `code-quality`
- Rename `test` job to `code-tests`
- Add and configure pytest options in `pyproject.toml`
- Simplify pytest call in `ci.yml`
- Specify version numbers for dependencies
- Improve type annotations in `casregnum.py` to comply with mypy
- Add `casregnum.pyi` type stub for static type checking
- Add `py.typed` marker file to indicate typed package
- Extend CI matrix to multiple OS and Python versions
- Bump version to 1.1.2
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@molshape molshape merged commit 7ca346e into main Sep 14, 2025
7 checks passed
@molshape molshape deleted the refactor/mypy-integration branch September 14, 2025 11:30
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.

3 participants