Uh oh!
There was an error while loading. Please reload this page.
Improve type annotations throughout pystemd - #111
Merged
Conversation
aleivagforce-pushed
the
improve-typing-annotations
branch
from
January 6, 2026 23:11
e7b71ec to
74b302bCompareThis commit modernizes and enhances type annotations across the codebase: - Add comprehensive type annotations to pystemd.run function signature including all 30 parameters and return type - Create SupportsFileno Protocol for proper typing of file-like objects - Add from __future__ import annotations to all Python source files for forward compatibility - Migrate from old typing syntax to modern Python 3.10+ syntax: * Union[A, B] -> A | B * Optional[T] -> T | None * List[T] -> list[T] * Tuple[T, ...] -> tuple[T, ...] * Dict[K, V] -> dict[K, V] - Update __init__.pyi stub file to match improved run() signature - Add proper type annotations to __exit__ method in base.py - Remove unused typing imports (Union, Optional, List, Tuple, Dict) where replaced by modern syntax These changes improve IDE support, enable better static type checking, and make the codebase more maintainable while maintaining backward compatibility with Python 3.10+.
aleivagforce-pushed
the
improve-typing-annotations
branch
from
January 6, 2026 23:13
74b302b to
0c91f65Comparealeivag
marked this pull request as ready for review
January 6, 2026 23:15
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit modernizes and enhances type annotations across the codebase:
These changes improve IDE support, enable better static type checking, and make the codebase more maintainable while maintaining backward compatibility with Python 3.10+.