Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: mark package as typed #1431

Merged
merged 1 commit into from
Nov 26, 2023
Merged

fix: mark package as typed #1431

merged 1 commit into from
Nov 26, 2023

Conversation

sisp
Copy link
Member

@sisp sisp commented Nov 25, 2023

I've added the file py.typed to mark the copier package as typed when imported in other projects.

Fixes #1381.

I've added the file `py.typed` to mark the `copier` package as typed when imported in other projects.

Fixes #1381.
Copy link

codecov bot commented Nov 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cc1ca14) 97.36% compared to head (75ec513) 97.36%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1431   +/-   ##
=======================================
  Coverage   97.36%   97.36%           
=======================================
  Files          48       48           
  Lines        4520     4520           
=======================================
  Hits         4401     4401           
  Misses        119      119           
Flag Coverage Δ
unittests 97.36% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@sisp
Copy link
Member Author

sisp commented Nov 25, 2023

Or would the change type build(typing) be better? 🤔 It wouldn't appear in the changelog though ...

@bswck
Copy link

bswck commented Nov 25, 2023

Not strictly related to the PR: This project needs some modernization of type hints (don't use typing.Union, typing.Callable, etc.), a bit like here CERT-Polska/malduck#111 (I am mainly thinking of CERT-Polska/malduck@197dca8).

I would wait with merging this PR as long as the codebase does not fully pass mypy --strict, which I can confirm without checking at the moment, for example because of some non-parametrized generics (Mapping, Path, etc.).

I am aware of that pydantic renders type annotations at runtime. I am aware that the earliest supported Python version is 3.8.
I can devote some time for this. Do you mind me opening an issue to modernize type hinting in the project @yajo?

Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

@bswck of course you're welcome to help improving type hints! You could even add the strict mode to our mypy checks, so we make sure there are no regressions on that.

OTOH, I see no reason for blocking this PR to wait for your improvement.

@yajo yajo merged commit f0b80f0 into master Nov 26, 2023
21 checks passed
@yajo yajo deleted the fix/py-typed branch November 26, 2023 13:06
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.

Add py.typed file
3 participants