Skip to content

Commit 0e8a5cc

Browse files
authored
refactor: broken directory existence check due to missing me (#2615)
The code checks `content.is_dir` instead of calling `content.is_dir()`. Since bound method objects are always truthy, the assertion never validates extraction output and can mask packaging/extraction failures. Affected files: tox_sdist.py Signed-off-by: tuanaiseo <221258316+tuanaiseo@users.noreply.github.com>
1 parent 7b216f6 commit 0e8a5cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/tox_sdist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def extract_sdist(archive, target):
3131
targz.extractall(target)
3232

3333
content = target / archive.with_suffix('').stem
34-
assert content.is_dir, 'no extracted directory found, something is wrong!'
34+
assert content.is_dir(), 'no extracted directory found, something is wrong!'
3535
logging.info(f'Extracted {archive} to {content}.')
3636
return content
3737

0 commit comments

Comments
 (0)