Skip to content

Commit 46c7e21

Browse files
committed
Add compression/__init__.py and revert tooling change
1 parent e7fed14 commit 46c7e21

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

Lib/compression/__init__.py

Whitespace-only changes.

Tools/build/generate_stdlib_module_names.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from check_extension_modules import ModuleChecker
99

10+
1011
SCRIPT_NAME = 'Tools/build/generate_stdlib_module_names.py'
1112

1213
SRC_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
@@ -70,16 +71,8 @@ def list_packages(names):
7071
package_path = os.path.join(STDLIB_PATH, name)
7172
if not os.path.isdir(package_path):
7273
continue
73-
# Walk the package directory to check if the package is a namespace
74-
has_py_files = False
75-
for root, _dirs, files in os.walk(package_path):
76-
for file in files:
77-
if file.endswith(".py"):
78-
has_py_files = True
79-
break
80-
if has_py_files:
81-
break
82-
if has_py_files:
74+
if any(package_file.endswith(".py")
75+
for package_file in os.listdir(package_path)):
8376
names.add(name)
8477

8578

0 commit comments

Comments
 (0)