From eb0f00671f8206ceb50b5520d12933a33c7e6722 Mon Sep 17 00:00:00 2001 From: alex blackwell Date: Mon, 2 Oct 2023 14:50:00 -0700 Subject: [PATCH] Rename py-strict to type-strict --- README.md | 8 ++++---- setup.py | 6 +++--- {py_strict => type_strict}/__init__.py | 2 +- {py_strict => type_strict}/strict.py | 0 {py_strict_tests => type_strict_tests}/__init__.py | 0 .../test_custom_types.py | 2 +- {py_strict_tests => type_strict_tests}/test_defaults.py | 2 +- {py_strict_tests => type_strict_tests}/test_dict.py | 2 +- {py_strict_tests => type_strict_tests}/test_list.py | 2 +- {py_strict_tests => type_strict_tests}/test_set.py | 2 +- {py_strict_tests => type_strict_tests}/test_strict.py | 2 +- {py_strict_tests => type_strict_tests}/test_tuple.py | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) rename {py_strict => type_strict}/__init__.py (90%) rename {py_strict => type_strict}/strict.py (100%) rename {py_strict_tests => type_strict_tests}/__init__.py (100%) rename {py_strict_tests => type_strict_tests}/test_custom_types.py (95%) rename {py_strict_tests => type_strict_tests}/test_defaults.py (98%) rename {py_strict_tests => type_strict_tests}/test_dict.py (98%) rename {py_strict_tests => type_strict_tests}/test_list.py (98%) rename {py_strict_tests => type_strict_tests}/test_set.py (93%) rename {py_strict_tests => type_strict_tests}/test_strict.py (98%) rename {py_strict_tests => type_strict_tests}/test_tuple.py (92%) diff --git a/README.md b/README.md index 4705722..7857a9c 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -# Py-Strict +# Type-Strict Python's missing runtime type checker ## Installation ``` -pip install py-strict +pip install type-strict ``` ## Usage ```py -from py_strict import strict +from type_strict import strict @strict def person_age(name: str, age: int) -> str @@ -44,7 +44,7 @@ def func(person: Person, employee: Employee): 4. Checks return type if specified. 5. Works with any combination of args, kwargs, and defaults. 6. Informative error messages. -7. In the event of a failure, Py-Strict swallows the error to avoid user impact. +7. In the event of a failure, type-strict swallows the error to avoid user impact. ## Limitations 1. **Performance:** Type checking is done at _runtime_. So, there is a performance diff --git a/setup.py b/setup.py index 73195a5..64e524c 100644 --- a/setup.py +++ b/setup.py @@ -6,14 +6,14 @@ long_description = (this_directory / "README.md").read_text() setup( - name="py-strict", + name="type-strict", version="0.1.0", description="Python's missing runtime type checker", - # url='https://github.com/', + url='https://github.com/Alex0Blackwell/type-strict', author="Alex Blackwell", author_email="alex.blackwell314@gmail.com", license="MIT", - packages=["py_strict"], + packages=["type_strict"], long_description=long_description, long_description_content_type="text/markdown", classifiers=[ diff --git a/py_strict/__init__.py b/type_strict/__init__.py similarity index 90% rename from py_strict/__init__.py rename to type_strict/__init__.py index 9e4941c..57331e7 100644 --- a/py_strict/__init__.py +++ b/type_strict/__init__.py @@ -1,5 +1,5 @@ """ -py_strict. +type_strict. Python's missing runtime type checker """ diff --git a/py_strict/strict.py b/type_strict/strict.py similarity index 100% rename from py_strict/strict.py rename to type_strict/strict.py diff --git a/py_strict_tests/__init__.py b/type_strict_tests/__init__.py similarity index 100% rename from py_strict_tests/__init__.py rename to type_strict_tests/__init__.py diff --git a/py_strict_tests/test_custom_types.py b/type_strict_tests/test_custom_types.py similarity index 95% rename from py_strict_tests/test_custom_types.py rename to type_strict_tests/test_custom_types.py index af6744e..c3ca8db 100644 --- a/py_strict_tests/test_custom_types.py +++ b/type_strict_tests/test_custom_types.py @@ -2,7 +2,7 @@ import pytest -from py_strict.strict import strict +from type_strict.strict import strict def test_custom_arg(): diff --git a/py_strict_tests/test_defaults.py b/type_strict_tests/test_defaults.py similarity index 98% rename from py_strict_tests/test_defaults.py rename to type_strict_tests/test_defaults.py index db2d251..f00fcfc 100644 --- a/py_strict_tests/test_defaults.py +++ b/type_strict_tests/test_defaults.py @@ -3,7 +3,7 @@ import pytest -from py_strict.strict import strict +from type_strict.strict import strict def test_default(): diff --git a/py_strict_tests/test_dict.py b/type_strict_tests/test_dict.py similarity index 98% rename from py_strict_tests/test_dict.py rename to type_strict_tests/test_dict.py index f4eda0f..0188f24 100644 --- a/py_strict_tests/test_dict.py +++ b/type_strict_tests/test_dict.py @@ -2,7 +2,7 @@ import pytest -from py_strict.strict import strict +from type_strict.strict import strict def test_dict_arg(): diff --git a/py_strict_tests/test_list.py b/type_strict_tests/test_list.py similarity index 98% rename from py_strict_tests/test_list.py rename to type_strict_tests/test_list.py index 3fdc7d2..fe887db 100644 --- a/py_strict_tests/test_list.py +++ b/type_strict_tests/test_list.py @@ -2,7 +2,7 @@ import pytest -from py_strict.strict import strict +from type_strict.strict import strict def test_list_arg(): diff --git a/py_strict_tests/test_set.py b/type_strict_tests/test_set.py similarity index 93% rename from py_strict_tests/test_set.py rename to type_strict_tests/test_set.py index 76d02c6..ca7d20b 100644 --- a/py_strict_tests/test_set.py +++ b/type_strict_tests/test_set.py @@ -2,7 +2,7 @@ import pytest -from py_strict.strict import strict +from type_strict.strict import strict def test_set_arg(): diff --git a/py_strict_tests/test_strict.py b/type_strict_tests/test_strict.py similarity index 98% rename from py_strict_tests/test_strict.py rename to type_strict_tests/test_strict.py index 97e4590..3ff85c7 100644 --- a/py_strict_tests/test_strict.py +++ b/type_strict_tests/test_strict.py @@ -2,7 +2,7 @@ import pytest -from py_strict.strict import strict +from type_strict.strict import strict def test_empty(): diff --git a/py_strict_tests/test_tuple.py b/type_strict_tests/test_tuple.py similarity index 92% rename from py_strict_tests/test_tuple.py rename to type_strict_tests/test_tuple.py index b59d508..dc6321f 100644 --- a/py_strict_tests/test_tuple.py +++ b/type_strict_tests/test_tuple.py @@ -2,7 +2,7 @@ import pytest -from py_strict.strict import strict +from type_strict.strict import strict def test_tuple_arg():