A pre-commit hook that checks whether a private function is being called outside of where it should be.
# .pre-commit-hooks.yaml
- id: private-calls-check
name: private-calls-check
description: Checks whether a private function is being called outside of where it should be.
entry: private_calls_check
language: python
This tool CAN'T identify function calls when they're an attribute like the example below. We are open to contributions, though, so if you know how to fix this, please do!
import foo
value = foo._bar()