Skip to content

Ignore CPython generated module dunders in pyrefly coverage report - #3507

Closed
jorenham wants to merge 1 commit into
pyrefly-org:mainfrom
jorenham:gh-3505
Closed

jorenham wants to merge 1 commit into
pyrefly-org:mainfrom
jorenham:gh-3505

Conversation

@jorenham

Copy link
Copy Markdown
Collaborator

Summary

This excludes several CPython-injected dunder module attributes from the pyrefly coverage report, matching those from crates/pyrefly_types/src/globals.rs:

  • __annotations__
  • __builtins__
  • __cached__
  • __debug__
  • __dict__
  • __file__
  • __loader__
  • __name__
  • __package__
  • __path__

Fixes #3505

Test Plan

This includes unit- and integration tests.

@github-actions

Copy link
Copy Markdown

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@meta-codesync

meta-codesync Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@yangdanny97 has imported this pull request. If you are a Meta employee, you can view this in D106044906.

@yangdanny97 yangdanny97 self-assigned this May 22, 2026

@stroxler stroxler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

@meta-codesync

meta-codesync Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@yangdanny97 merged this pull request in 0d234bc.

@jorenham
jorenham deleted the gh-3505 branch May 22, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pyrefly report includes many generated dunders for __main__.py

3 participants