Skip to content

replace typing module with native collection types#120

Merged
alxmrs merged 1 commit intoalxmrs:mainfrom
Ebraam-Ashraf:modernize-type-hints
Mar 1, 2026
Merged

replace typing module with native collection types#120
alxmrs merged 1 commit intoalxmrs:mainfrom
Ebraam-Ashraf:modernize-type-hints

Conversation

@Ebraam-Ashraf
Copy link
Copy Markdown
Contributor

Fix #110

Replaced all deprecated typing module aliases across core.py, df.py, and reader.py with their native Python equivalents, as the project targets Python ≥ 3.10 which fully supports them.
This includes switching things like typing.List, typing.Dict, typing.Tuple to their built-in forms,
replacing typing.Optional[X] with the X | None union syntax,
and moving Iterator, Callable, Mapping, and Hashable to collections.abc where they belong.
typing.Any and typing.TYPE_CHECKING were kept from typing as they have no native equivalents.
The changes were applied using pyupgrade --py310-plus to ensure consistency and correctness.

also i ran the existing test suite after the changes to confirm nothing was broken.

Copy link
Copy Markdown
Owner

@alxmrs alxmrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution!

@alxmrs alxmrs merged commit 17bc410 into alxmrs:main Mar 1, 2026
12 checks passed
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.

Update typing to favor native collections instead of typing classes

2 participants