Skip to content

Conversation

@cyyever
Copy link
Contributor

@cyyever cyyever commented Mar 30, 2025

Description

py.typed is a marker file to support typing. See pep 561. It's used to indicate that ONNX has typing support in the source code and tools such as mypy and pylint can take advantage of that. Therefore, we don't need an additional pyi file for typing.

Motivation and Context

Better code.

Signed-off-by: cyy <cyyever@outlook.com>
@cyyever cyyever requested a review from a team as a code owner March 30, 2025 07:27
@github-project-automation github-project-automation bot moved this to In progress in PR Tracker Mar 30, 2025
@codecov
Copy link

codecov bot commented Mar 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.28%. Comparing base (11f59ea) to head (4d89319).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6843   +/-   ##
=======================================
  Coverage   56.28%   56.28%           
=======================================
  Files         509      509           
  Lines       32580    32580           
  Branches     3099     3099           
=======================================
  Hits        18337    18337           
  Misses      13385    13385           
  Partials      858      858           

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

@andife
Copy link
Member

andife commented Mar 30, 2025

Description

py.typed is a marker file to support typing. See pep 561. It's used to indicate that transformer has typing support in the source code and tools such as mypy and pylint can take advantage of that. Therefore, we don't need an additional pyi file for typing.

Motivation and Context

Better code.

transformer?

@cyyever
Copy link
Contributor Author

cyyever commented Mar 30, 2025

typo

@andife andife self-assigned this Mar 30, 2025
Signed-off-by: cyy <cyyever@outlook.com>
Signed-off-by: cyy <cyyever@outlook.com>
@cyyever
Copy link
Contributor Author

cyyever commented Mar 30, 2025

@justinchuby isort is also removed.

@andife
Copy link
Member

andife commented Mar 30, 2025

Also interesting, then the analysis mentioned in #6710 was wrong, because there py.typed was detected

@github-project-automation github-project-automation bot moved this from In progress to Reviewer approved in PR Tracker Mar 30, 2025
@justinchuby justinchuby added this pull request to the merge queue Mar 30, 2025
Merged via the queue into onnx:main with commit 95ecc67 Mar 30, 2025
49 checks passed
@github-project-automation github-project-automation bot moved this from Reviewer approved to Done in PR Tracker Mar 30, 2025
@cyyever cyyever deleted the pytyped branch March 31, 2025 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants