https://github.com/symonk/pre-commit-pdb-vars
A pre-commit framework hook that prevents variable names matching pdb shortcuts.
https://github.com/symonk/pre-commit-pdb-vars
Last synced: about 2 months ago
JSON representation
A pre-commit framework hook that prevents variable names matching pdb shortcuts.
- Host: GitHub
- URL: https://github.com/symonk/pre-commit-pdb-vars
- Owner: symonk
- License: apache-2.0
- Created: 2021-11-20T13:32:03.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-13T17:22:03.000Z (4 months ago)
- Last Synced: 2025-02-08T20:47:33.220Z (3 months ago)
- Language: Python
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pre-commit-pdb-vars
A pre-commit framework hook that prevents variable names matching pdb shortcuts# How to use it:
```yaml
# Add to your .pre-commit-config.yaml
- repo: https://github.com/symonk/pre-commit-pdb-vars.git
rev: 0.2.0
hooks:
- id: pdb-vars
``````console
✘ user@ubuntu ~/workspaces/pre-commit-pdb-vars main ✚ pre-commit run --all-files
black....................................................................Passed
Trim Trailing Whitespace.................................................Passed
Fix End of Files.........................................................Passed
Check Yaml...............................................................Passed
Check for case conflicts.................................................Passed
Check docstring is first.................................................Passed
Debug Statements (Python)................................................Passed
Detect Private Key.......................................................Passed
Fix requirements.txt.................................(no files to check)Skipped
isort....................................................................Passed
mypy.....................................................................Passed
flake8...................................................................Passed
pdb-vars.................................................................Failed
- hook id: pdb-vars
- exit code: 1Prohibited PDB Command name `q` at: /home/si/workspaces/pre-commit-pdb-vars/test_files/fail.py:1:0.
Prohibited PDB Command name `s` at: /home/si/workspaces/pre-commit-pdb-vars/test_files/fail.py:3:0.
Prohibited PDB Command name `enable` at: /home/si/workspaces/pre-commit-pdb-vars/test_files/fail.py:5:0.
Prohibited PDB Command function def `alias` at: /home/si/workspaces/pre-commit-pdb-vars/test_files/fail.py:8:0.
Prohibited PDB Command function def `disable` at: /home/si/workspaces/pre-commit-pdb-vars/test_files/fail.py:13:4.
```