79730307

Date: 2025-08-08 23:17:37
Score: 2.5
Natty:
Report link

I wrote my own implementation of the hook I needed - shrimport.

shrimptor repository's readme header

It goes through all the files passed to it and checks them for relative imports that go beyond the package boundaries.

The tool also has useful arguments: -v / --verbose, -d / --dry-run, -i / --ignore and -R / --root-dir. You can read more about them in the tool help:

usage: main.py [-h] [-R ROOT_DIR] [-i IGNORED_PATHS] [-v] [-d] file_paths [file_paths ...]

positional arguments:
  file_paths            files to be processed

options:
  -h, --help            show this help message and exit
  -R ROOT_DIR, --root-dir ROOT_DIR
                        path to root directory (e.g., ./src)
  -i IGNORED_PATHS, --ignore IGNORED_PATHS
                        regex pattern to ignore file paths
  -v, --verbose         output extra information
  -d, --dry-run         run without changes

I hope I have helped you as much as I have helped myself.

Reasons:
  • Blacklisted phrase (1): help me
  • Blacklisted phrase (0.5): I need
  • Contains signature (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: lyova24