Skip to content

Ignore CPython generated module dunders in pyrefly coverage report#3507

Open
jorenham wants to merge 1 commit into
facebook:mainfrom
jorenham:gh-3505
Open

Ignore CPython generated module dunders in pyrefly coverage report#3507
jorenham wants to merge 1 commit into
facebook:mainfrom
jorenham:gh-3505

Conversation

@jorenham
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented May 22, 2026

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

@stroxler stroxler left a comment

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.

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