Skip to content

Remove dependency on typing-inspect#179

Merged
martinjm97 merged 1 commit into
swansonk14:mainfrom
gvalkov:main
Jan 25, 2026
Merged

Remove dependency on typing-inspect#179
martinjm97 merged 1 commit into
swansonk14:mainfrom
gvalkov:main

Conversation

@gvalkov

@gvalkov gvalkov commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

Hello,

This project is using a tiny part of typing-inspect. Most of what seems to be needed has already been implemented in Python 3.10. Not that typing-inspect and its two transitive dependencies (mypy-extensions, typing-extensions) are bad, but less dependencies always gives more peace of mind, imho.

Kind regards,
Georgi

@codecov-commenter

codecov-commenter commented Jan 9, 2026

Copy link
Copy Markdown

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

Codecov Report

❌ Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.07%. Comparing base (9379872) to head (c7489c6).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/tap/utils.py 91.66% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #179      +/-   ##
==========================================
- Coverage   94.21%   94.07%   -0.14%     
==========================================
  Files           4        4              
  Lines         760      759       -1     
==========================================
- Hits          716      714       -2     
- Misses         44       45       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@martinjm97 martinjm97 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks excellent overall. Will take a more careful look soon. Thank you!

Comment thread src/tap/utils.py
"""Same as typing_inspect.get_args but fixes Python 3.10 union types."""
if isinstance(tp, UnionType):
return tp.__args__
def is_literal_type(tp: Any) -> bool:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think that it's worth adding a test for this change (if that indeed is what codecov has an issue with).

@martinjm97 martinjm97 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @gvalkov,

Thank you for contributing to Tap! It is now a little leaner and a little cleaner.

--JK

@martinjm97 martinjm97 merged commit 586a059 into swansonk14:main Jan 25, 2026
15 of 17 checks passed
@gvalkov

gvalkov commented Feb 4, 2026

Copy link
Copy Markdown
Contributor Author

Happy to help :)

Removing the tests from docstring_parser will further reduce the installed footprint (which hardly matters unfortunately).

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