Skip to content

tox static: fix platform regex for fullmatch#571

Merged
webknjaz merged 1 commit intoaio-libs:masterfrom
loqs:tox-static
May 6, 2026
Merged

tox static: fix platform regex for fullmatch#571
webknjaz merged 1 commit intoaio-libs:masterfrom
loqs:tox-static

Conversation

@loqs
Copy link
Copy Markdown
Contributor

@loqs loqs commented Apr 10, 2026

What do these changes do?

  • Fix platform match to fix skipping tox static environment on all platforms.

Are there changes in behavior for the user?

No.

Related issue number

Related #544.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • tox testenvs have been executed in the following environments:
    • Linux (Ubuntu 18.04, Ubuntu 20.04, Arch): static
    • Windows (7, 10): {py36,py37,py38,py39}-{nocov,cov,diffcov}
    • WSL 1.0 (Ubuntu 18.04): {py36,py37,py38,py39}-{nocov,cov,diffcov}, pypy3-{nocov,cov}, qa, docs
    • FreeBSD (12.2, 12.1, 11.4): {py36,pypy3}-{nocov,cov,diffcov}, qa
    • Cygwin: py36-{nocov,cov,diffcov}, qa, docs
  • Documentation reflects the changes
  • Add a news fragment into the NEWS.rst file

@loqs
Copy link
Copy Markdown
Contributor Author

loqs commented Apr 10, 2026

mypy did not detect any of these errors. Would you prefer to suppress them in pytype rather than make code changes?

@webknjaz
Copy link
Copy Markdown
Member

Sounds like there's two separate changes mixed up in this PR. At least, put them into separate PRs?

re.fullmatch('^(?!win32)(?!cygwin)') will only match start of line followed by
 not 'win32' and not 'cygwin' followed by nothing meaning an empty string.
This causes static to be skipped on platforms it was intended to be run on
such as linux.

Fix by changing the regular expression to '^(?!win32)(?!cygwin).*$' which will
full match start of line followed by not 'win32' and not 'cygwin' followed by
anything followed by end of line.# Please enter the commit message for your changes. Lines starting
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.84%. Comparing base (a55d3de) to head (8c0a0d5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #571      +/-   ##
==========================================
- Coverage   97.86%   97.84%   -0.02%     
==========================================
  Files          23       23              
  Lines        5701     5701              
  Branches      766      766              
==========================================
- Hits         5579     5578       -1     
- Misses         77       79       +2     
+ Partials       45       44       -1     

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

@loqs
Copy link
Copy Markdown
Contributor Author

loqs commented Apr 25, 2026

Sounds like there's two separate changes mixed up in this PR. At least, put them into separate PRs?

I have dropped the fixes for the issues detected by mpyp this pull request now covers just the change to the regular expression matching that selects platforms on which the tox static environment can run.

@webknjaz webknjaz changed the title Fix tox static tox static: fix platform regex for fullmatch May 6, 2026
@webknjaz webknjaz merged commit fd1fd7e into aio-libs:master May 6, 2026
19 of 22 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