From ab41b1df7dcbf45c117f2a7b54093a35762b0e40 Mon Sep 17 00:00:00 2001 From: Adam Hupp Date: Fri, 15 Jan 2021 14:49:23 -0800 Subject: prefix add_compat with an underscore to avoid namespace pollution --- magic/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'magic') 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()) -- cgit v1.2.1