Skip to content

Conversation

@j-t-1
Copy link
Contributor

@j-t-1 j-t-1 commented Apr 7, 2025

The line removed from being excluded is: "if name == .main.:". Note the two periods around main.

The line removed from being excluded is: "if __name__ == .__main__.:". Note the two periods around __main__.
@codecov
Copy link

codecov bot commented Apr 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.59%. Comparing base (b7ae2e5) to head (bae2253).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3239   +/-   ##
=======================================
  Coverage   96.59%   96.59%           
=======================================
  Files          53       53           
  Lines        8954     8954           
  Branches     1648     1648           
=======================================
  Hits         8649     8649           
  Misses        183      183           
  Partials      122      122           

☔ 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.

@j-t-1
Copy link
Contributor Author

j-t-1 commented Apr 7, 2025

If have understood this correctly, the two periods in .__main__. would make the code not run in cases it would if the periods were omitted. Likely we want to avoid entirely this method of putting non-runnable code in the codebase.

@stefan6419846
Copy link
Collaborator

I prefer to keep this - branches like in

if __name__ == "__main__":
(which match this condition) usually will not be covered in favor of keeping the code there as small as possible and writing proper unit tests.

I am not sure what your previous comment is trying to tell me. According to the docs, the period is the regex period, id est matching any character exactly once. It is one of the officially mentioned patterns and most likely accounts for the different quoting characters (single/double) one might use.

This being said, I vote to close this PR.

@j-t-1
Copy link
Contributor Author

j-t-1 commented Apr 7, 2025

@stefan6419846 was unaware it was part of a regex. Thus could close this PR.

@j-t-1 j-t-1 deleted the coverage branch April 7, 2025 11:26
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