mirror of
https://github.com/crytic/slither.git
synced 2026-10-12 02:12:39 +00:00
* feat: upgrade minimum Python version to 3.10, modernize type annotations - Update requires-python from >=3.9 to >=3.10 - Replace typing.List/Dict/Set/Tuple with builtin generics (PEP 585) - Replace Union[A, B] with A | B syntax (PEP 604) - Replace Optional[X] with X | None (PEP 604) - Remove importlib_metadata dependency (stdlib sufficient in 3.10+) - Add slots=True to dataclasses for memory efficiency - Update CI matrix to test 3.10-3.14 - Enable ruff rules UP006, UP007, UP035, UP037, UP045, RUF013 Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: update plugin_example and doctor.yml for Python 3.10 minimum - Modernize type annotations in plugin_example - Update doctor.yml CI matrix from 3.9 to 3.10 Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: update docs.yml to Python 3.10 Missed in the original Python 3.10 upgrade. The docs workflow would fail after merge since pyproject.toml requires Python >=3.10. Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
Slither, Plugin Example
This repository contains an example of plugin for Slither.
See the detector documentation.
Architecture
pyproject.toml: Contains the plugin information and dependenciesslither_my_plugin/__init__.py: Containsmake_plugin(). The function must return the list of new detectors and printersslither_my_plugin/detectors/example.py: Detector plugin skeleton.
Installation
Once these files are updated with your plugin, install it:
uv sync
uv run slither --help # Verify plugin is loaded