Skip to content

Annotation parser should handle FrozenSet/frozenset types #75

@bbopen

Description

@bbopen

Summary

parseAnnotationToPythonType and normalizeCollectionName do not recognize FrozenSet[...] or frozenset[...]. These are mapped to custom types instead of set equivalents, leading to less accurate TS types.

Evidence

  • src/tywrap.ts normalizeCollectionName only matches List/Dict/Tuple/Set.
  • mapSimpleName lacks FrozenSet/frozenset handling.

Proposed fix

  • Extend normalizeCollectionName and mapSimpleName to include FrozenSet / frozenset and map to set/frozenset collection type.

Acceptance criteria

  • FrozenSet[int] and frozenset[int] are parsed as collection types.
  • TS mapping uses Set<T> (or a dedicated frozenset representation if preferred).

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions