Hostile 98% python Download

crosshair-tool 0.0.114

Applies wraps to nested Python functionBasename is uppercase README.md

Evidence

Python 3.14 classifier PKG-INFO · lines 17–22
17:39… thon :: 3.12
18Classifier: Programming Language :: Python :: 3.13
19Classifier: Programming Language :: Python :: 3.14
20Classifier: Programming Language :: Python :: 3.15
21Classifier: Programming Language :: Python :: Implementation :: CPython
22Clas …
Declares Markdown package description PKG-INFO · lines 22–31
22:53… Assurance
23Classifier: Topic :: Software Development :: Testing
24Requires-Python: >=3.9
25Description-Content-Type: text/markdown
26License-File: LICENSE
27Requires-Dist: packaging
28Requires-Dist: typing-inspect>=0.7.1
29Requires-Dist: typing_extensions>=3.10.0
30Requires-Dist: z3-solver>=4.13.0.0
31Requires-Dist: …
Twenty or more Markdown HTTP link spans README.md · lines 1–28
1<img src="https://raw.githubusercontent.com/pschanely/CrossHair/main/doc/source/logo-gray.png" width="5%" align="left">
2
3# CrossHair
4
5[![Join the chat on Discord](https://img.shields.io/discord/1346219754519789719?logo=discord&logoColor=white)](https://discord.gg/rUeTaYTWbb)
6[![Check status](https://github.com/pschanely/CrossHair/actions/workflows/test_crosshair.yml/badge.svg?branch=main&event=push)](https://github.com/pschanely/CrossHair/actions/workflows/test_crosshair.yml?query=branch%3Amain)
7[![Downloads](https://static.pepy.tech/badge/crosshair-tool/week)](https://pepy.tech/project/crosshair-tool)
8
9An analysis tool for Python that blurs the line between testing and
10type systems.
11
12> **_THE LATEST NEWS:_**
13Python's most popular property-based testing tool,
14[Hypothesis](https://hypothesis.readthedocs.io/en/latest/),
15now supports running CrossHair as an
16[optional backend](https://hypothesis.readthedocs.io/en/latest/strategies.html#alternative-backends)!
17
18
19If you have a function with
20[type annotations](https://www.python.org/dev/peps/pep-0484/) and add a
21contract
22[in a supported syntax](https://crosshair.readthedocs.io/en/latest/kinds_of_contracts.html),
23CrossHair will attempt to find counterexamples for you:
24
25![Animated GIF demonstrating the verification of a python function](https://raw.githubusercontent.com/pschanely/CrossHair/main/doc/source/duplicate_list.gif)
26
27CrossHair works by repeatedly calling your functions with symbolic inputs.
28It uses an [SMT solver] (a kind of theorem prover) …
imports PackageNotFoundError from importlib.metadata __init__.py · lines 1–43
1"""Analyze Python code for correctness using symbolic execution."""
2
3import sys
4from importlib.metadata import PackageNotFoundError, version
5
6from crosshair.core import (
7 SymbolicFactory,
8 deep_realize,
9 patch_to_return,
10 realize,
11 register_patch,
12 register_type,
13 with_realized_args,
14)
15from crosshair.statespace import StateSpace
16from crosshair.tracers import NoTracing, ResumedTracing
17from crosshair.util import IgnoreAttempt, debug
18
19try:
20 __version__ = version("crosshair-tool")
21except PackageNotFoundError:
22 __version__ = "0.0.dev0"
23
24
25def env_info() -> str:
26 python_ver = sys.version.split(" ")[0]
27 return f"CrossHair v{__version__} on {sys.platform}, Python {python_ver}"
28
29
⋯14 lines
Switch dispatches on a command-like variable _mark_stacks.h · lines 604–609
604:46… %d priorstack %d\n", i, opcode, oparg, next_stack);
605 switch (opcode) {
606 case POP_JUMP_IF_FALSE:
607 case POP_JUMP_IF_TRUE:
608 case POP_JUMP_IF_NONE:
609 …

Showing the top 5 files — 8 more files (93 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.