Skip to content

Quality: Broken directory existence check due to missing method call#2615

Merged
CaselIT merged 1 commit intofalconry:masterfrom
tuanaiseo:contribai/improve/quality/broken-directory-existence-check-due-to-
Apr 5, 2026
Merged

Quality: Broken directory existence check due to missing method call#2615
CaselIT merged 1 commit intofalconry:masterfrom
tuanaiseo:contribai/improve/quality/broken-directory-existence-check-due-to-

Conversation

@tuanaiseo
Copy link
Copy Markdown
Contributor

Problem

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.

Severity: high
File: tools/tox_sdist.py

Solution

Replace assert content.is_dir, ... with assert content.is_dir(), ... so the check validates the extracted directory correctly.

Changes

  • tools/tox_sdist.py (modified)

Testing

  • Existing tests pass
  • Manual review completed
  • No new warnings/errors introduced

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>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7b216f6) to head (ae6fe8a).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2615   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           64        64           
  Lines         7914      7914           
  Branches      1087      1087           
=========================================
  Hits          7914      7914           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@CaselIT CaselIT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nicely spotted!

@CaselIT
Copy link
Copy Markdown
Member

CaselIT commented Apr 5, 2026

the fails don't seem related to this PR, so merging

@CaselIT CaselIT merged commit 0e8a5cc into falconry:master Apr 5, 2026
31 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants