Skip to content

Commit 2e1b2a8

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

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

Lib/compression/__init__.py

Whitespace-only changes.

Tools/build/generate_stdlib_module_names.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,8 @@ def list_packages(names):
7070
package_path = os.path.join(STDLIB_PATH, name)
7171
if not os.path.isdir(package_path):
7272
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:
73+
if any(package_file.endswith(".py")
74+
for package_file in os.listdir(package_path)):
8375
names.add(name)
8476

8577

0 commit comments

Comments
 (0)