Skip to content

python: Add py.typed marker file#74

Merged
Robo210 merged 1 commit intomicrosoft:mainfrom
bkeryan:users/bkeryan/py-typed
May 5, 2025
Merged

python: Add py.typed marker file#74
Robo210 merged 1 commit intomicrosoft:mainfrom
bkeryan:users/bkeryan/py-typed

Conversation

@bkeryan
Copy link
Copy Markdown
Contributor

@bkeryan bkeryan commented May 1, 2025

What does this Pull Request accomplish?

Add a py.typed marker file so type checkers like Mypy and Pyright know that traceloggingdynamic has type hints.

To enable adding this marker file, convert the top-level traceloggingdynamic module into an import package and update setup.cfg to find packages.

Why should this Pull Request be merged?

Fixes #57

What testing has been done?

Built and ran tests with Python 3.11.9:

python -m build
pip install .\dist\traceloggingdynamic-1.0.0-py3-none-any.whl
python .\tests\traceloggingdynamictest.py -v

Opened the sdist and wheel in 7-Zip to verify that the package's __init__.py and py.typed files are present.

Ran mypy on a project that uses traceloggingdynamic.

Signed-off-by: Brad Keryan <brad.keryan@ni.com>
@bkeryan bkeryan requested a review from a team as a code owner May 1, 2025 23:08
@bkeryan
Copy link
Copy Markdown
Contributor Author

bkeryan commented May 5, 2025

@microsoft-github-policy-service agree company="Emerson"

@Robo210 Robo210 merged commit 330a84f into microsoft:main May 5, 2025
1 check passed
@idigdoug
Copy link
Copy Markdown
Collaborator

idigdoug commented May 5, 2025

@microsoft-github-policy-service agree company="Emerson"

Thanks a bunch!

@Robo210
Copy link
Copy Markdown
Collaborator

Robo210 commented May 5, 2025

Pushed to pypi as version 1.0.1

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.

Python traceloggingdynamic package is missing py.typed marker file

3 participants