Skip to content

Find a way of avoiding the casts in Shape._from_geojson. #356

@JamesParrott

Description

@JamesParrott

Describe the feature request

Can mypy be taught to narrow to a particular TypedDict from a union of them, based on a test of string keys with Literal values types in them?

https://github.com/GeospatialPython/pyshp/blob/19010dfbe0ef7a7ac0d9c2d1a62585a6a4cd2ec4/src/shapefile.py#L992C9-L992C22

Contributions

  • I am interested in implementing the described feature request and submit as a PR.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions