Skip to content

Recognize reversed Python main guards - #283

Open
tin-computer[bot] wants to merge 3 commits into
mainfrom
fix/python-reversed-main-guard
Open

Recognize reversed Python main guards#283
tin-computer[bot] wants to merge 3 commits into
mainfrom
fix/python-reversed-main-guard

Conversation

@tin-computer

@tin-computer tin-computer Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a human-labeled fixture for the valid reversed Python main guard if "__main__" == __name__:.
  • Recognize that single valid operand order as Python entrypoint evidence.
  • Keep comments, documentation strings, a different variable, and != comparisons out of entrypoints.

Measured correction

  • Unchanged analyzer: precision 1.0, recall 0.0 (TP 0, FP 0, FN 1).
  • Corrected analyzer: precision 1.0, recall 1.0 (TP 1, FP 0, FN 0).
  • Fixture-first evidence: 902188a; failing regression: f7882ea; correction: 439d48a.

Validation

  • Focused Python entrypoint checks: 9 passed.
  • Full analyzer suite: 673 passed across 57 files.
  • Lint passed.
  • Type checking passed.

This PR is intentionally unmerged for review.

ChimdumebiNebolisa and others added 3 commits August 22, 2026 02:16
Co-authored-by: tin-computer[bot] <277149838+tin-computer[bot]@users.noreply.github.com>
Co-authored-by: tin-computer[bot] <277149838+tin-computer[bot]@users.noreply.github.com>
Co-authored-by: tin-computer[bot] <277149838+tin-computer[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
repo-atlas Ready Ready Preview Aug 22, 2026 2:20am

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.

1 participant