@@ -527,26 +527,26 @@ def test_third_party_stubs(args: TestConfig, tempdir: Path) -> TestSummary:
527527 if spec_matches_path (gitignore_spec , distribution_path ):
528528 continue
529529
530- metadata = read_metadata (distribution )
531- if not metadata .requires_python .contains (PYTHON_VERSION ):
532- msg = (
533- f"skipping { distribution !r} (requires Python { metadata .requires_python } ; "
534- f"test is being run using Python { PYTHON_VERSION } )"
535- )
536- print (colored (msg , "yellow" ))
537- summary .skip_package ()
538- continue
539- if not metadata .requires_python .contains (args .version ):
540- msg = f"skipping { distribution !r} for target Python { args .version } (requires Python { metadata .requires_python } )"
541- print (colored (msg , "yellow" ))
542- summary .skip_package ()
543- continue
544-
545530 if (
546531 distribution_path in args .filter
547532 or Path ("stubs" ) in args .filter
548533 or any (distribution_path in path .parents for path in args .filter )
549534 ):
535+ metadata = read_metadata (distribution )
536+ if not metadata .requires_python .contains (PYTHON_VERSION ):
537+ msg = (
538+ f"skipping { distribution !r} (requires Python { metadata .requires_python } ; "
539+ f"test is being run using Python { PYTHON_VERSION } )"
540+ )
541+ print (colored (msg , "yellow" ))
542+ summary .skip_package ()
543+ continue
544+ if not metadata .requires_python .contains (args .version ):
545+ msg = f"skipping { distribution !r} for target Python { args .version } (requires Python { metadata .requires_python } )"
546+ print (colored (msg , "yellow" ))
547+ summary .skip_package ()
548+ continue
549+
550550 distributions_to_check [distribution ] = get_recursive_requirements (distribution )
551551
552552 # Setup the necessary virtual environments for testing the third-party stubs.
0 commit comments