[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2024-04-13 00:00:18 +00:00
parent 72ad6dc953
commit f4cd1ba0d6
813 changed files with 66015 additions and 58839 deletions

View file

@ -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