Metadata-Version: 2.2
Name: xinspect
Version: 0.4.0
Summary: The xinspect module
Home-page: https://github.com/Erotemic/xinspect
Author: Jon Crall
Author-email: erotemic@gmail.com
License: Apache 2
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: xdoctest>=1.1.5
Requires-Dist: redbaron>=0.8
Requires-Dist: ubelt>=1.3.3
Requires-Dist: pyflakes>=2.5.0
Provides-Extra: all
Requires-Dist: xdoctest>=1.1.5; extra == "all"
Requires-Dist: redbaron>=0.8; extra == "all"
Requires-Dist: ubelt>=1.3.3; extra == "all"
Requires-Dist: pyflakes>=2.5.0; extra == "all"
Requires-Dist: xdoctest>=1.1.5; extra == "all"
Requires-Dist: pytest>=8.1.1; (python_version < "4.0" and python_version >= "3.13") and extra == "all"
Requires-Dist: pytest>=8.1.1; (python_version < "3.13" and python_version >= "3.12") and extra == "all"
Requires-Dist: pytest>=8.1.1; (python_version < "3.12" and python_version >= "3.11") and extra == "all"
Requires-Dist: pytest>=6.2.5; (python_version < "3.11" and python_version >= "3.10") and extra == "all"
Requires-Dist: pytest>=4.6.0; (python_version < "3.10.0" and python_version >= "3.7.0") and extra == "all"
Requires-Dist: pytest-cov>=3.0.0; extra == "all"
Requires-Dist: coverage>=7.3.0; (python_version < "4.0" and python_version >= "3.12") and extra == "all"
Requires-Dist: coverage>=6.1.1; (python_version < "3.12" and python_version >= "3.10") and extra == "all"
Requires-Dist: coverage>=5.3.1; (python_version < "3.10" and python_version >= "3.9") and extra == "all"
Requires-Dist: coverage>=6.1.1; (python_version < "3.9" and python_version >= "3.8") and extra == "all"
Provides-Extra: runtime
Requires-Dist: xdoctest>=1.1.5; extra == "runtime"
Requires-Dist: redbaron>=0.8; extra == "runtime"
Requires-Dist: ubelt>=1.3.3; extra == "runtime"
Requires-Dist: pyflakes>=2.5.0; extra == "runtime"
Provides-Extra: tests
Requires-Dist: xdoctest>=1.1.5; extra == "tests"
Requires-Dist: pytest>=8.1.1; (python_version < "4.0" and python_version >= "3.13") and extra == "tests"
Requires-Dist: pytest>=8.1.1; (python_version < "3.13" and python_version >= "3.12") and extra == "tests"
Requires-Dist: pytest>=8.1.1; (python_version < "3.12" and python_version >= "3.11") and extra == "tests"
Requires-Dist: pytest>=6.2.5; (python_version < "3.11" and python_version >= "3.10") and extra == "tests"
Requires-Dist: pytest>=4.6.0; (python_version < "3.10.0" and python_version >= "3.7.0") and extra == "tests"
Requires-Dist: pytest-cov>=3.0.0; extra == "tests"
Requires-Dist: coverage>=7.3.0; (python_version < "4.0" and python_version >= "3.12") and extra == "tests"
Requires-Dist: coverage>=6.1.1; (python_version < "3.12" and python_version >= "3.10") and extra == "tests"
Requires-Dist: coverage>=5.3.1; (python_version < "3.10" and python_version >= "3.9") and extra == "tests"
Requires-Dist: coverage>=6.1.1; (python_version < "3.9" and python_version >= "3.8") and extra == "tests"
Provides-Extra: optional
Provides-Extra: docs
Requires-Dist: sphinx>=5.0.1; extra == "docs"
Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "docs"
Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "docs"
Requires-Dist: sphinxcontrib-napoleon>=0.7; extra == "docs"
Requires-Dist: sphinx-autoapi>=1.8.4; extra == "docs"
Requires-Dist: Pygments>=2.9.0; extra == "docs"
Requires-Dist: myst_parser>=0.18.0; extra == "docs"
Requires-Dist: sphinx-reredirects>=0.0.1; extra == "docs"
Provides-Extra: all-strict
Requires-Dist: xdoctest==1.1.5; extra == "all-strict"
Requires-Dist: redbaron==0.8; extra == "all-strict"
Requires-Dist: ubelt==1.3.3; extra == "all-strict"
Requires-Dist: pyflakes==2.5.0; extra == "all-strict"
Requires-Dist: xdoctest==1.1.5; extra == "all-strict"
Requires-Dist: pytest==8.1.1; (python_version < "4.0" and python_version >= "3.13") and extra == "all-strict"
Requires-Dist: pytest==8.1.1; (python_version < "3.13" and python_version >= "3.12") and extra == "all-strict"
Requires-Dist: pytest==8.1.1; (python_version < "3.12" and python_version >= "3.11") and extra == "all-strict"
Requires-Dist: pytest==6.2.5; (python_version < "3.11" and python_version >= "3.10") and extra == "all-strict"
Requires-Dist: pytest==4.6.0; (python_version < "3.10.0" and python_version >= "3.7.0") and extra == "all-strict"
Requires-Dist: pytest-cov==3.0.0; extra == "all-strict"
Requires-Dist: coverage==7.3.0; (python_version < "4.0" and python_version >= "3.12") and extra == "all-strict"
Requires-Dist: coverage==6.1.1; (python_version < "3.12" and python_version >= "3.10") and extra == "all-strict"
Requires-Dist: coverage==5.3.1; (python_version < "3.10" and python_version >= "3.9") and extra == "all-strict"
Requires-Dist: coverage==6.1.1; (python_version < "3.9" and python_version >= "3.8") and extra == "all-strict"
Provides-Extra: runtime-strict
Requires-Dist: xdoctest==1.1.5; extra == "runtime-strict"
Requires-Dist: redbaron==0.8; extra == "runtime-strict"
Requires-Dist: ubelt==1.3.3; extra == "runtime-strict"
Requires-Dist: pyflakes==2.5.0; extra == "runtime-strict"
Provides-Extra: tests-strict
Requires-Dist: xdoctest==1.1.5; extra == "tests-strict"
Requires-Dist: pytest==8.1.1; (python_version < "4.0" and python_version >= "3.13") and extra == "tests-strict"
Requires-Dist: pytest==8.1.1; (python_version < "3.13" and python_version >= "3.12") and extra == "tests-strict"
Requires-Dist: pytest==8.1.1; (python_version < "3.12" and python_version >= "3.11") and extra == "tests-strict"
Requires-Dist: pytest==6.2.5; (python_version < "3.11" and python_version >= "3.10") and extra == "tests-strict"
Requires-Dist: pytest==4.6.0; (python_version < "3.10.0" and python_version >= "3.7.0") and extra == "tests-strict"
Requires-Dist: pytest-cov==3.0.0; extra == "tests-strict"
Requires-Dist: coverage==7.3.0; (python_version < "4.0" and python_version >= "3.12") and extra == "tests-strict"
Requires-Dist: coverage==6.1.1; (python_version < "3.12" and python_version >= "3.10") and extra == "tests-strict"
Requires-Dist: coverage==5.3.1; (python_version < "3.10" and python_version >= "3.9") and extra == "tests-strict"
Requires-Dist: coverage==6.1.1; (python_version < "3.9" and python_version >= "3.8") and extra == "tests-strict"
Provides-Extra: optional-strict
Provides-Extra: docs-strict
Requires-Dist: sphinx==5.0.1; extra == "docs-strict"
Requires-Dist: sphinx-autobuild==2021.3.14; extra == "docs-strict"
Requires-Dist: sphinx_rtd_theme==1.0.0; extra == "docs-strict"
Requires-Dist: sphinxcontrib-napoleon==0.7; extra == "docs-strict"
Requires-Dist: sphinx-autoapi==1.8.4; extra == "docs-strict"
Requires-Dist: Pygments==2.9.0; extra == "docs-strict"
Requires-Dist: myst_parser==0.18.0; extra == "docs-strict"
Requires-Dist: sphinx-reredirects==0.0.1; extra == "docs-strict"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

|Codecov| |Pypi| |Downloads| |ReadTheDocs|

Tools for static and dynamic code introspection. This library has not been well
maintained, and there are likely other libraries that are better.


Helps with writing doctests

::

    def func(a=1, b=2, c=3):
        """
        Example:
            >>> from this.module import *  # import contextual namespace
            >>> import xinspect
            >>> globals().update(xinspect.get_func_kwargs(func))  # populates globals with default kwarg value
            >>> print(a + b + c)
            6
        """


Helps with code that generates code

::

    >>> import ubelt as ub
    >>> source = ub.codeblock(
    >>>     '''
    >>>     p = os.path.dirname(join('a', 'b'))
    >>>     glob.glob(p)
    >>>     ''')
    >>> # Generate a list of lines to fix the name errors
    >>> lines = autogen_imports(source=source)
    >>> print(lines)
    ['import glob', 'from os.path import join', 'import os']


See Also: https://github.com/Erotemic/xdev



.. |CircleCI| image:: https://circleci.com/gh/Erotemic/xinspect.svg?style=svg
    :target: https://circleci.com/gh/Erotemic/xinspect
.. |Codecov| image:: https://codecov.io/github/Erotemic/xinspect/badge.svg?branch=master&service=github
   :target: https://codecov.io/github/Erotemic/xinspect?branch=master
.. |Pypi| image:: https://img.shields.io/pypi/v/xinspect.svg
   :target: https://pypi.python.org/pypi/xinspect
.. |Downloads| image:: https://img.shields.io/pypi/dm/xinspect.svg
   :target: https://pypistats.org/packages/xinspect
.. |ReadTheDocs| image:: https://readthedocs.org/projects/xinspect/badge/?version=latest
    :target: http://xinspect.readthedocs.io/en/latest/
