Skip to main content

Simply calls pytypes.enable_global_typechecked_profiler() when 'PYTYPES' env var is set.

Project description

pytypes-env

If PYTYPES env var is set when you import this module then pytypes.enable_global_typechecked_profiler() will be called to enable typechecking. Typechecking will be applied to any import or definition after the import statement.

Usage: Import pytypes_env in a script:

import pytypes_env

def test(foo: str) -> bool:
  return "hello"


test(1)

Then run:

 > python3 test.py
Traceback (most recent call last):
  File "test.py", line 7, in <module>
    test(1)
  File "test.py", line 3, in test
    def test(foo: str) -> bool:
pytypes.exceptions.InputTypeError:
  __main__.test
  called with incompatible types:
Expected: Tuple[str]
Received: Tuple[int]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytypes-env-0.0.5.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

pytypes_env-0.0.5-py3-none-any.whl (1.9 kB view details)

Uploaded Python 3

File details

Details for the file pytypes-env-0.0.5.tar.gz.

File metadata

  • Download URL: pytypes-env-0.0.5.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9

File hashes

Hashes for pytypes-env-0.0.5.tar.gz
Algorithm Hash digest
SHA256 dcad7d781d60f7e82ff9a8161b036175efdcadf390dd514785d94e5e0cdc2f07
MD5 0c11dbf2d0747b45d15d1ff2caf2946e
BLAKE2b-256 35f2ee67fe59475d7d9f589bd6eb2eaedeb4c58f0945be9532febd2ac73c4291

See more details on using hashes here.

File details

Details for the file pytypes_env-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: pytypes_env-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 1.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9

File hashes

Hashes for pytypes_env-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 13788f3941db4df97627f7347b0d25085e7785da12c7d18accf141f9787cebdf
MD5 08dbb6cf1894085bb40582efd7263355
BLAKE2b-256 86cf28678827ea90d0ef4b7da05dac8d8938500f31d72c9d8c159e6151f9a830

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page