mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-08 12:34:17 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
72ad6dc953
commit
f4cd1ba0d6
813 changed files with 66015 additions and 58839 deletions
|
|
@ -1,15 +1,16 @@
|
|||
"""
|
||||
Monkey patching of distutils.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
import distutils.filelist
|
||||
import platform
|
||||
import types
|
||||
import functools
|
||||
from importlib import import_module
|
||||
import inspect
|
||||
import platform
|
||||
import sys
|
||||
import types
|
||||
from importlib import import_module
|
||||
|
||||
import distutils.filelist
|
||||
import setuptools
|
||||
|
||||
__all__ = []
|
||||
|
|
@ -28,7 +29,7 @@ def _get_mro(cls):
|
|||
function will return a tuple containing the class itself, and the contents
|
||||
of cls.__bases__. See https://github.com/pypa/setuptools/issues/1024.
|
||||
"""
|
||||
if platform.python_implementation() == "Jython":
|
||||
if platform.python_implementation() == 'Jython':
|
||||
return (cls,) + cls.__bases__
|
||||
return inspect.getmro(cls)
|
||||
|
||||
|
|
@ -55,7 +56,7 @@ def get_unpatched_class(cls):
|
|||
)
|
||||
base = next(external_bases)
|
||||
if not base.__module__.startswith('distutils'):
|
||||
msg = "distutils has already been patched by %r" % cls
|
||||
msg = 'distutils has already been patched by %r' % cls
|
||||
raise AssertionError(msg)
|
||||
return base
|
||||
|
||||
|
|
@ -71,10 +72,8 @@ def patch_all():
|
|||
distutils.filelist.findall = setuptools.findall
|
||||
|
||||
needs_warehouse = (
|
||||
sys.version_info < (2, 7, 13)
|
||||
or
|
||||
(3, 4) < sys.version_info < (3, 4, 6)
|
||||
or
|
||||
sys.version_info < (2, 7, 13) or
|
||||
(3, 4) < sys.version_info < (3, 4, 6) or
|
||||
(3, 5) < sys.version_info <= (3, 5, 3)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue