mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-10 13:24:18 +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
|
|
@ -5,12 +5,13 @@ Changes include:
|
|||
* `yield from` and PEP3102 `*` removed.
|
||||
* Hidden files are not ignored.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import fnmatch
|
||||
import os
|
||||
import re
|
||||
import fnmatch
|
||||
|
||||
__all__ = ["glob", "iglob", "escape"]
|
||||
__all__ = ['glob', 'iglob', 'escape']
|
||||
|
||||
|
||||
def glob(pathname, recursive=False):
|
||||
|
|
@ -113,8 +114,7 @@ def glob0(dirname, basename):
|
|||
def glob2(dirname, pattern):
|
||||
assert _isrecursive(pattern)
|
||||
yield pattern[:0]
|
||||
for x in _rlistdir(dirname):
|
||||
yield x
|
||||
yield from _rlistdir(dirname)
|
||||
|
||||
|
||||
# Recursively yields relative pathnames inside a literal directory.
|
||||
|
|
@ -126,7 +126,7 @@ def _rlistdir(dirname):
|
|||
dirname = os.curdir
|
||||
try:
|
||||
names = os.listdir(dirname)
|
||||
except os.error:
|
||||
except OSError:
|
||||
return
|
||||
for x in names:
|
||||
yield x
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue