Skip to content

Discourging modules named tools, helpers, or utils

License

Notifications You must be signed in to change notification settings

swenger/ToolHelperUtils

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ToolHelperUtils

This package creates an intentionally broken import interceptor for modules containing tools, helper, and utils in their name to discourage their use

>>> import tool_helper_utils
>>> import tool_helper_utils.foobar.best_tools_utils
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1316, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1256, in _find_spec
  File "/Users/chris/Code/ToolHelperUtils/tool_helper_utils/__init__.py", line 15, in find_spec
    return self.find_module(fullname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/Code/ToolHelperUtils/tool_helper_utils/__init__.py", line 11, in find_module
    raise ValueError("stop it")
ValueError: stop it

About

Discourging modules named tools, helpers, or utils

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%