feat: Add py.typed marker file for proper typing support #44

Merged
h0rv merged 1 commits from feature/add-py-typed-support into main 2025-09-12 13:23:13 +00:00
h0rv commented 2025-09-10 18:00:04 +00:00 (Migrated from github.com)

Summary

  • Add py.typed marker file to jambo package directory to signal typing support to static type checkers

Background

This addresses the missing py.typed file that prevents static type checkers from recognizing the library's type annotations. Without this marker file, type checkers treat the package as untyped even though it contains comprehensive type hints.

Changes

  • Created empty jambo/py.typed marker file

Test plan

  • Static type checkers will now recognize jambo as a typed package
  • IDEs and tools like mypy, pyright can properly type-check code using this library

🤖 Generated with Claude Code

## Summary - Add `py.typed` marker file to jambo package directory to signal typing support to static type checkers ## Background This addresses the missing `py.typed` file that prevents static type checkers from recognizing the library's type annotations. Without this marker file, type checkers treat the package as untyped even though it contains comprehensive type hints. ## Changes - Created empty `jambo/py.typed` marker file ## Test plan - [x] Static type checkers will now recognize jambo as a typed package - [x] IDEs and tools like mypy, pyright can properly type-check code using this library 🤖 Generated with [Claude Code](https://claude.ai/code)
h0rv commented 2025-09-10 18:01:32 +00:00 (Migrated from github.com)

lol i thought it may have required more configuration

lol i thought it may have required more configuration
HideyoshiNakazone commented 2025-09-11 01:41:26 +00:00 (Migrated from github.com)

I want to be upfront—I haven’t verified how MyPy handles static analysis for this repository yet. I’ll make some improvements to the internal typing before merging this for better use of all mypy users.

And i've been thinking and statically checking a pydantic class created with this package would be kinda awkward, you'd probably would have to declare the class as type[object] or Any to avoid some checking...

I want to be upfront—I haven’t verified how MyPy handles static analysis for this repository yet. I’ll make some improvements to the internal typing before merging this for better use of all mypy users. And i've been thinking and statically checking a pydantic class created with this package would be kinda awkward, you'd probably would have to declare the class as `type[object]` or `Any` to avoid some checking...
h0rv commented 2025-09-11 03:10:43 +00:00 (Migrated from github.com)

i tested it and it worked good with mypy. it's also for usage of functions: JSONSchema TypedDict for the input, for example.

i tested it and it worked good with mypy. it's also for usage of functions: JSONSchema TypedDict for the input, for example.
h0rv commented 2025-09-11 03:23:11 +00:00 (Migrated from github.com)

And the result is not awkward, it produces a BaseModel, which is important to know for several libraries.

And the result is not awkward, it produces a BaseModel, which is important to know for several libraries.
codecov[bot] commented 2025-09-12 13:20:40 +00:00 (Migrated from github.com)

Codecov Report

All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

## [Codecov](https://app.codecov.io/gh/HideyoshiNakazone/jambo/pull/44?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vitor+Hideyoshi) Report :white_check_mark: All modified and coverable lines are covered by tests. :loudspeaker: Thoughts on this report? [Let us know!](https://github.com/codecov/feedback/issues/255)
HideyoshiNakazone commented 2025-09-12 13:23:03 +00:00 (Migrated from github.com)

If you’ve tested it, I’ll go ahead and merge. The release containing this code will include additional fixes and internal improvements I’m planning, and therefore might take some time to be released.

If you’ve tested it, I’ll go ahead and merge. The release containing this code will include additional fixes and internal improvements I’m planning, and therefore might take some time to be released.
Sign in to join this conversation.