Skip to main content

This package implements a non intrusive and optional type checking in functions and methods by using annotations. Once types are defined in annotations, no changes are required to make the verification of types. And, because it is completely optional, it can be used only in the desired environments, like unit testings. This way, the performance of production code is not affected.

Learn more in:

https://bitbucket.org/carlopires/optypecheck

Installation

pip3 install optypecheck

Example

def gencode(a: bytes, b: str) -> str:
    return '{}{}'.format(a[0], b)

def valid_number(n) -> 'decimal.Decimal':
    return n

# enable type checking in DEBUG mode
assert __import__('typecheck').typecheck(__name__)

Release files for optypecheck 15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for optypecheck 15
File Size Uploaded
optypecheck-15.tar.gz 6.0 kB Details

Release files / optypecheck-15.tar.gz

Download URL optypecheck-15.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a2a319da7bc2d2da24e57862ebb75bfeb0650878b09ce6074c5215fd01dd0910
BLAKE2b-256 checksum
How to use checksums
7e8537a073ea699db660fa09cd27850aac73296c2da0cb27a47d26739786d06b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

17

1 release file

16

1 release file

This release

15 This release

1 release file

14

1 release file

13

1 release file

12

1 release file

11

1 release file

10

1 release file

9

1 release file

8

1 release file

7

1 release file

6

1 release file

5

1 release file

4

1 release file

2

1 release file

1.9

1 release file

1.8

1 release file

1.7

1 release file

1.6

1 release file

1.5

1 release file

1.4

1 release file

1.3

1 release file

1.1

1 release file

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page