Skip to main content

find failing section in python source

Project description

minimize source code

If you build a linter, formatter or any other tool which has to analyse python source code you might end up searching bugs in pretty large input files.

pysource_minimize is able to remove everything from the python source which is not related to the problem.

Example:

>>> from pysource_minimize import minimize

>>> source = """
... def f():
...     print("bug"+"other string")
...     return 1+1
... f()
... """

>>> print(minimize(source, lambda new_source: "bug" in new_source))
"""bug"""

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

pysource_minimize-0.3.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

pysource_minimize-0.3.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file pysource_minimize-0.3.0.tar.gz.

File metadata

  • Download URL: pysource_minimize-0.3.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.11.0 Linux/5.10.0-19-amd64

File hashes

Hashes for pysource_minimize-0.3.0.tar.gz
Algorithm Hash digest
SHA256 acf4ab91940c9a9be5e71c22b2c56da8bb20d59a40cd5992e9826133a99195cf
MD5 78c9154e2092f560807e6492987ab532
BLAKE2b-256 d546c92f4bbdf5fb0dbcca9f001ea8d5a33d1367884c99bc1a1b0959a2b653d2

See more details on using hashes here.

File details

Details for the file pysource_minimize-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pysource_minimize-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.11.0 Linux/5.10.0-19-amd64

File hashes

Hashes for pysource_minimize-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50454b77da40457a3629021fc67a6b5f702f0468f1c0378121d5c0ba77e419aa
MD5 caf165858b5aba91f446a9a32e08050a
BLAKE2b-256 3cf7b006bfd475c4107bd848464971a25063871b0137d8414a7a215ca66d4b66

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