From ee71586a0672b8de898edc6a8d6c77d75b70a0c2 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Fri, 6 Jun 2025 21:20:40 +0200 Subject: [PATCH] fix(typing): Explicitly declare public API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pyright flags our `orjsonl.append` because PEP 484’s stub-file export rules (import-as-alias or __all__) are applied to all py.typed libraries (PEP 561). We therefore need to re-export append explicitly, e.g. append as append or via __all__, so type checkers recognise it as part of the public API. This is fixed by reexporting as done in this PR. --- src/orjsonl/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/orjsonl/__init__.py b/src/orjsonl/__init__.py index 3c48b9f..bca6638 100644 --- a/src/orjsonl/__init__.py +++ b/src/orjsonl/__init__.py @@ -1,9 +1,9 @@ """A lightweight, high-performance Python library for parsing jsonl files.""" from .orjsonl import ( - stream, - load, - save, - append, - extend, + stream as stream, + load as load, + save as save, + append as append, + extend as extend, )