check-duplicate-functions
Detect duplicate function names in Python files using AST parsing.
Features
- Detects duplicate function names (module-level and in classes)
- AST-based; handles async functions and type annotations
- Excludes special methods (
__init__,__str__, etc.) - No external dependencies
Requirements
- Python 3.8+
- Standard library only
Installation
pip install check-duplicate-functions
Usage
check-duplicate-functions <python_file_path>
Examples
check-duplicate-functions my_script.py
check-duplicate-functions src/utils.py
Output
- No duplicates: Exits with code 0 (no output)
- Duplicates found: Prints each duplicate name and line numbers, e.g.
[DUPLICATE] 'my_function' appears on lines: 10, 25, 42 - Errors: Prints message and exits with code 1
Exit codes
0— Success1— Error (bad args, file not found, syntax error, etc.)
Author
Pandiyaraj Karuppasamy
Metadata
Release files for check-duplicate-functions 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| check_duplicate_functions-1.0.2.tar.gz | 6.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| check_duplicate_functions-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.1 kB
Release files / check_duplicate_functions-1.0.2.tar.gz
| Download URL | check_duplicate_functions-1.0.2.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e67c8f576c16d2f5ac81c3914bfb23ed02a3410d234ba3d091353f8e9b6c3c7e
|
|
BLAKE2b-256 checksum How to use checksums |
451abb9933f8b6fb519e501042873f3a89204b778d553a4fa965be2438aa2e3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / check_duplicate_functions-1.0.2-py3-none-any.whl
| Download URL | check_duplicate_functions-1.0.2-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae86452fdb95b2a9ee88972bcaeb9599dbfdeda1be8edad856eca085391227a9
|
|
BLAKE2b-256 checksum How to use checksums |
4e2d87eb349042b38996684fc156dd54725b0d85a5d8c6a5c13a6f2245342a0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for check-duplicate-functions 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.