Browse Source

Fix linting issues

pull/3/head
Brett Langdon 7 years ago
parent
commit
4a3d0c5c84
No known key found for this signature in database GPG Key ID: B664881177781B04
2 changed files with 2 additions and 3 deletions
  1. +1
    -1
      importhook/__init__.py
  2. +1
    -2
      importhook/finder.py

+ 1
- 1
importhook/__init__.py View File

@ -123,7 +123,7 @@ def copy_module(module, copy_attributes=True, copy_spec=True):
name = get_module_name(module)
new_mod = types.ModuleType(name)
setattr(new_mod, '__original_module__', module)
setattr(new_mod, '__reset_module__', lambda: uncopy_module(name))
setattr(new_mod, '__reset_module__', lambda: reset_module(name))
# Copy all module attributes
if copy_attributes:


+ 1
- 2
importhook/finder.py View File

@ -1,4 +1,3 @@
from importlib.abc import MetaPathFinder
import functools
from .loader import HookLoader
@ -14,7 +13,7 @@ def hook_finder(finder):
"""
# If this finder has already been 'hooked', then return as-is
if hasattr(finder, '__hooked__'):
return finder;
return finder
# Determine if we were given an instance or a class
if isinstance(finder, type):


Loading…
Cancel
Save