Commit Graph

7 Commits

Author SHA1 Message Date
50f7ff89b9 Merge pull request #1 from johndoe6345789/copilot/enforce-strict-type-checking
Add strict type checking and annotation enforcement to _freeze_module.py
2025-12-24 18:11:43 +00:00
copilot-swe-agent[bot]
49770f774b Update user-facing strings in source code to use Typthon
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-24 18:03:06 +00:00
copilot-swe-agent[bot]
b0af5a66cd Add type annotations to helper functions per code review
- Added type annotations to strict_types decorator (func: F -> F)
- Added type annotations to _check_type parameters (value: Any, expected_type: Type)
- Removed unused get_type_hints import
- Added TypeVar and proper typing imports for decorator
- All functions now have complete type annotations including helpers

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-24 12:50:16 +00:00
copilot-swe-agent[bot]
8af79e6e8b Enforce type annotations at function definition time
- Added @strict_types decorator that validates all parameters have type hints
- Functions without type annotations now raise TypeError at definition time
- All functions in the module decorated with @strict_types
- def my_func(var1, var2): raises TypeError (no annotations)
- def my_func(var1: str, var2: int): is accepted (has annotations)

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-24 12:48:37 +00:00
copilot-swe-agent[bot]
b72a44eb4c Fix code review feedback - improve error handling and remove redundant checks
- Use getattr to safely access __name__ attribute for better type error messages
- Remove redundant type checks for sys.argv elements (guaranteed to be strings)

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-24 12:30:09 +00:00
copilot-swe-agent[bot]
f669c5c74c Add strict type checking to _freeze_module.py
- Added complete type annotations to all functions, parameters, and return types
- Added runtime type checking function _check_type() that enforces strict typing
- All functions now validate parameter types and raise TypeError if incorrect
- Added comprehensive docstrings explaining type requirements
- Module header variable now has explicit type annotation
- Tested both normal operation and type error detection

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-24 12:29:04 +00:00
Richie Ward
9853be11ff Initial 3.14 commit 2025-07-22 07:54:51 +01:00