summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Hupp <adam@hupp.org>2021-01-15 14:49:23 -0800
committerAdam Hupp <adam@hupp.org>2021-01-15 14:49:23 -0800
commitab41b1df7dcbf45c117f2a7b54093a35762b0e40 (patch)
treec7baa381c49232cb3348ede60f625daadaacc5f5
parent665b7bdcc3df29039f64ed7d9e49fc77842942d9 (diff)
downloadpython-magic-ab41b1df7dcbf45c117f2a7b54093a35762b0e40.tar.gz
prefix add_compat with an underscore to avoid namespace pollution
-rw-r--r--magic/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/magic/__init__.py b/magic/__init__.py
index 86b1dc5..554f3f5 100644
--- a/magic/__init__.py
+++ b/magic/__init__.py
@@ -446,7 +446,7 @@ MAGIC_PARAM_BYTES_MAX = 6 # Max number of bytes to read from file
# libmagic. This is a common source of confusion for users. To
# resolve, We ship a copy of that module, and expose it's functions
# wrapped in deprecation warnings.
-def add_compat(to_module):
+def _add_compat(to_module):
import warnings, re
from magic import compat
@@ -486,4 +486,4 @@ def add_compat(to_module):
to_module[name] = value
-add_compat(globals())
+_add_compat(globals())