mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-07 20:26:54 +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,6 +1,10 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import sys
|
||||
from itertools import product, starmap
|
||||
from itertools import product
|
||||
from itertools import starmap
|
||||
|
||||
import distutils.command.install_lib as orig
|
||||
|
||||
|
||||
|
|
@ -78,7 +82,8 @@ class install_lib(orig.install_lib):
|
|||
return
|
||||
|
||||
base = os.path.join(
|
||||
'__pycache__', '__init__.' + sys.implementation.cache_tag)
|
||||
'__pycache__', '__init__.' + sys.implementation.cache_tag,
|
||||
)
|
||||
yield base + '.pyc'
|
||||
yield base + '.pyo'
|
||||
yield base + '.opt-1.pyc'
|
||||
|
|
@ -86,7 +91,7 @@ class install_lib(orig.install_lib):
|
|||
|
||||
def copy_tree(
|
||||
self, infile, outfile,
|
||||
preserve_mode=1, preserve_times=1, preserve_symlinks=0, level=1
|
||||
preserve_mode=1, preserve_times=1, preserve_symlinks=0, level=1,
|
||||
):
|
||||
assert preserve_mode and preserve_times and not preserve_symlinks
|
||||
exclude = self.get_exclusions()
|
||||
|
|
@ -103,11 +108,13 @@ class install_lib(orig.install_lib):
|
|||
|
||||
def pf(src, dst):
|
||||
if dst in exclude:
|
||||
log.warn("Skipping installation of %s (namespace package)",
|
||||
dst)
|
||||
log.warn(
|
||||
'Skipping installation of %s (namespace package)',
|
||||
dst,
|
||||
)
|
||||
return False
|
||||
|
||||
log.info("copying %s -> %s", src, os.path.dirname(dst))
|
||||
log.info('copying %s -> %s', src, os.path.dirname(dst))
|
||||
outfiles.append(dst)
|
||||
return dst
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue