Metadata-Version: 2.4
Name: pyshp-stubs
Version: 0.0.2
Summary: Static typing indicator for PyShp 3 (which is already typed).  PyShp is a pure Python read/write support for ESRI Shapefile format
Project-URL: Repository, https://github.com/JamesParrott/PyShp-stubs
Author-email: James Parrott <james@jamesparrott.dev>
Maintainer-email: James Parrott <james@jamesparrott.dev>
License-Expression: MIT
Keywords: geographic,geospatial,gis,shapefile,shapefiles
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# PyShp-stubs

## Overview
 - This library is simply to indicate to type checkers that type hints should be included from PyShp's 
   single file module ("shapefile.py"), even e.g. when being run with `mypy --ignore-missing-imports`. 
 - This is a minimal library.  As a wheel it solely consists of an empty `py.typed` marker file in a dir "shapefile-stubs".  It contains no actual stubs (as they're not needed, the type hints are in the main library)
 - It is intended to be installed (into "Lib\site-packages") alongside the main PyShp repo (`pip install Pyshp[stubs]`).
 - The main PyShp repo (from version 3 onwards) contains inline type  hints, but is currently a single file module ("shapefile.py").
 - PEP 561 states ""The single-file module should be refactored into a package".  We respectfully disagree.
 - If `py.typed` is installed alongside "shapefile.py" in"Lib\site-packages", all packages installed
   in that (virtual) Python env will be typechecked by mypy, whether they contain type info or not 
Nominal type stubs for PyShp.

## Description

PyShp 3 is statically typed.  PyShp has historically been a single file library (shapefile.py).

According to PEP 561, and [the spec](https://typing.python.org/en/latest/spec/distributing.html#packaging-typed-libraries) in order to add a py.typed marker file (without indicating to type checkers
that every package the user has installed adajacent to PyShp should also be type checked, regardless of whether all such packages support that or not), "The single-file module should be refactored into a package".

Myself and several other project contributers are reluctant to give up the single-file module (shapefile.py).  We quite like it.  

The purpose of this package is purely to indicate to type-checkers that PyShp is typed.  It just so happens to be primarily typed in-line in the main library, from which the stubs in shapefile.pyi are largely automatically generated by MyPy's stubgen.