memestra
memestra copied to clipboard
Python checker for places where deprecated functions are called.
Memestra!
Memestra, a static analysis tool for Python, which detects the use of deprecated APIs.
Documentation
Check out Memestra's full documentation:
https://memestra.readthedocs.io/
Sample Usages
Track usage of functions decorated by @deprecated.deprecated from the
deprecated <https://pypi.org/project/Deprecated/>_ package:
.. code-block:: console
> pip install deprecated
> cat test.py
import deprecated
@deprecated.deprecated
def foo(): pass
def bar():
foo()
foo()
> python memestra.py test.py
foo used at test.py:7:5
foo used at test.py:9:1
Track usage of functions decorated by deprecated imported from
decorator:
.. code-block:: console
> cat test2.py
from deprecated import deprecated
@deprecated
def foo(): pass
def bar():
foo()
foo()
> python memestra.py test2.py
foo used at test2.py:7:5
foo used at test2.py:9:1
Track usage of functions decorated by deprecated imported from
decorator and aliased:
.. code-block:: console
> cat test3.py
from deprecated import deprecated as dp
@dp
def foo(): pass
def bar():
foo()
foo()
> python memestra.py test3.py
foo used at test3.py:7:5
foo used at test3.py:9:1
License
We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.
This software is licensed under the BSD-3-Clause license. See the LICENSE file for details.