From 9c58147a01459da40e7f6d995246f8c6ff48bc4b Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 2 Oct 2020 03:39:44 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Create=20the=20typing=20package=20a?= =?UTF-8?q?nd=20use=20it=20instead=20of=20standard=20one?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- royalnet/alchemist/__init__.py | 2 +- royalnet/baron/__init__.py | 2 +- royalnet/typing/__init__.py | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 royalnet/typing/__init__.py diff --git a/royalnet/alchemist/__init__.py b/royalnet/alchemist/__init__.py index a613ec07..6ec7f7c3 100644 --- a/royalnet/alchemist/__init__.py +++ b/royalnet/alchemist/__init__.py @@ -1,4 +1,4 @@ -from typing import * +from royalnet.typing import * import sqlalchemy as sa diff --git a/royalnet/baron/__init__.py b/royalnet/baron/__init__.py index d50e7394..b83a0873 100644 --- a/royalnet/baron/__init__.py +++ b/royalnet/baron/__init__.py @@ -1,4 +1,4 @@ -from typing import * +from royalnet.typing import * import threading import redis import queue diff --git a/royalnet/typing/__init__.py b/royalnet/typing/__init__.py new file mode 100644 index 00000000..a0535e72 --- /dev/null +++ b/royalnet/typing/__init__.py @@ -0,0 +1,11 @@ +"""This package adds some new common types to the default typing package. + +It should be imported with: :: + + from royalnet.typing import * + +""" + +from typing import * + +JSON = Union[None, int, str, List["JSON"], Dict[str, "JSON"]]