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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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