{ "info": { "author": "Erik Aronesty", "author_email": "erik@q32.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "[![Build Status](https://travis-ci.com/earonesty/pystrict.svg?branch=master)](https://travis-ci.com/earonesty/pystrict)\n\n## strict\n\nPython strict tag\n\n pip install pystrict\n\n\nUsing @strict on classes can prevent serious errors by raising an exception when an instance has a variable created outside of init.\nUnfortunately, linters don't (cannot) always catch this. I can't express how much time this has saved me recently.\n\nUsing @strict on functions currently only checks type specifiers. \n\nTODO: \n\n`@strict(runtime=True)` will check types at runtime and raise ValueError if a bad type is passed\n\nExample:\n from pystrict import strict\n\n # not allowed, missing type specifier\n @strict\n def foo(x: int, y):\n ...\n\n\n # not allowed, missing type specifier in __init__\n @strict\n class Foo():\n def __init__(self, x: int, y):\n ...\n\n # not allowed, object modified outside of init\n @strict\n class Foo():\n def __init__(self, x: int):\n self.x = 1\n\n z=[Foo(1)]\n\n # oops...\n z[0].y = 4\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/earonesty/pystrict", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pystrict", "package_url": "https://pypi.org/project/pystrict/", "platform": "", "project_url": "https://pypi.org/project/pystrict/", "project_urls": { "Homepage": "https://github.com/earonesty/pystrict" }, "release_url": "https://pypi.org/project/pystrict/1.1/", "requires_dist": null, "requires_python": ">=3.6", "summary": "## strict", "version": "1.1" }, "last_serial": 5825428, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "c7abdce8782c53b1dbb64dc61316813f", "sha256": "6e3565153ac469e8307fc431378bd0ec0acfcaee9cca6b006bf81e4b605174ab" }, "downloads": -1, "filename": "pystrict-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c7abdce8782c53b1dbb64dc61316813f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4197, "upload_time": "2019-09-12T14:03:01", "url": "https://files.pythonhosted.org/packages/d9/bc/880c557a6bcfdd6ff0cccb31c7199d8260a4fea3ef696c41202b2a19fbc3/pystrict-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e3a18e585f7dec7bc0419d990fa093d3", "sha256": "99001c22b6ed8925691b90d836656b938b11f24462f719eae73722b2a560ddfa" }, "downloads": -1, "filename": "pystrict-1.0.tar.gz", "has_sig": false, "md5_digest": "e3a18e585f7dec7bc0419d990fa093d3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 9412, "upload_time": "2019-09-12T14:03:03", "url": "https://files.pythonhosted.org/packages/25/1b/1e49a8a370a8fef1e45c0e8c5e3baaf7239cea171c807e0d48c2bbdbc7ed/pystrict-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "852f6d59b1a60fabcb2c022c42eeca92", "sha256": "20a7e3a5f5af61bde834eb7198434cfa58a66b0af2aa5aa9292b072945ab5705" }, "downloads": -1, "filename": "pystrict-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "852f6d59b1a60fabcb2c022c42eeca92", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4414, "upload_time": "2019-09-13T12:52:16", "url": "https://files.pythonhosted.org/packages/95/51/1f15c684eb465df74d671f5cd2e59b323b266438319b7899114b430341d1/pystrict-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b712994bf40a89458f77bf0e5bb800bf", "sha256": "82dd3e33917ddb1b84a67a9ca9bbe583fde29307cbf5c77a94d91c4b9d842300" }, "downloads": -1, "filename": "pystrict-1.1.tar.gz", "has_sig": false, "md5_digest": "b712994bf40a89458f77bf0e5bb800bf", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 9468, "upload_time": "2019-09-13T12:52:18", "url": "https://files.pythonhosted.org/packages/08/a3/8e9fc5f72b660a855505ca42cd31bcaa4099557154b3b4b232b86533e2ff/pystrict-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "852f6d59b1a60fabcb2c022c42eeca92", "sha256": "20a7e3a5f5af61bde834eb7198434cfa58a66b0af2aa5aa9292b072945ab5705" }, "downloads": -1, "filename": "pystrict-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "852f6d59b1a60fabcb2c022c42eeca92", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4414, "upload_time": "2019-09-13T12:52:16", "url": "https://files.pythonhosted.org/packages/95/51/1f15c684eb465df74d671f5cd2e59b323b266438319b7899114b430341d1/pystrict-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b712994bf40a89458f77bf0e5bb800bf", "sha256": "82dd3e33917ddb1b84a67a9ca9bbe583fde29307cbf5c77a94d91c4b9d842300" }, "downloads": -1, "filename": "pystrict-1.1.tar.gz", "has_sig": false, "md5_digest": "b712994bf40a89458f77bf0e5bb800bf", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 9468, "upload_time": "2019-09-13T12:52:18", "url": "https://files.pythonhosted.org/packages/08/a3/8e9fc5f72b660a855505ca42cd31bcaa4099557154b3b4b232b86533e2ff/pystrict-1.1.tar.gz" } ] }