Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

pre-commit hook that checks whether a private function is being called outside of its module.

License

Notifications You must be signed in to change notification settings

Eric-Mendes/private-calls-pre-commit

Repository files navigation

private-calls-pre-commit

A pre-commit hook that checks whether a private function is being called outside of where it should be.

Usage

# .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

Caveats

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()

About

pre-commit hook that checks whether a private function is being called outside of its module.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages