@@ -42,8 +42,8 @@ def main(
4242 environment_variables : dict [str , str ],
4343 github_pages : bool ,
4444 keep_pr_linting : bool ,
45+ macos_python_version : PythonVersion | None ,
4546 no_cd : bool ,
46- no_macos : bool ,
4747 no_milestones : bool ,
4848 no_pypi : bool ,
4949 no_version_branches : bool ,
@@ -64,7 +64,7 @@ def main(
6464 doc_apt_packages ,
6565 environment_variables ,
6666 github_pages ,
67- no_macos ,
67+ macos_python_version ,
6868 python_version ,
6969 single_threaded ,
7070 skip_tests ,
@@ -132,7 +132,7 @@ def _update_ci_workflow( # noqa: PLR0917
132132 doc_apt_packages : list [str ],
133133 environment_variables : dict [str , str ],
134134 github_pages : bool ,
135- no_macos : bool ,
135+ macos_python_version : PythonVersion | None ,
136136 python_version : PythonVersion ,
137137 single_threaded : bool ,
138138 skip_tests : list [str ],
@@ -145,7 +145,7 @@ def update() -> None:
145145 doc_apt_packages ,
146146 environment_variables ,
147147 github_pages ,
148- no_macos ,
148+ macos_python_version ,
149149 python_version ,
150150 single_threaded ,
151151 skip_tests ,
@@ -181,7 +181,7 @@ def _get_ci_workflow( # noqa: PLR0917
181181 doc_apt_packages : list [str ],
182182 environment_variables : dict [str , str ],
183183 github_pages : bool ,
184- no_macos : bool ,
184+ macos_python_version : PythonVersion | None ,
185185 python_version : PythonVersion ,
186186 single_threaded : bool ,
187187 skip_tests : list [str ],
@@ -191,7 +191,9 @@ def _get_ci_workflow( # noqa: PLR0917
191191 config = yaml .load (path )
192192 __update_env_section (config , environment_variables )
193193 __update_doc_section (config , doc_apt_packages , python_version , github_pages )
194- __update_pytest_section (config , no_macos , single_threaded , skip_tests , test_extras )
194+ __update_pytest_section (
195+ config , macos_python_version , single_threaded , skip_tests , test_extras
196+ )
195197 __update_style_section (config , python_version , precommit )
196198 return yaml , config
197199
@@ -245,7 +247,7 @@ def __is_remove_style_job(precommit: Precommit) -> bool:
245247
246248def __update_pytest_section (
247249 config : CommentedMap ,
248- no_macos : bool ,
250+ macos_python_version : PythonVersion | None ,
249251 single_threaded : bool ,
250252 skip_tests : list [str ],
251253 test_extras : list [str ],
@@ -263,8 +265,10 @@ def __update_pytest_section(
263265 "CODECOV_TOKEN" : "${{ secrets.CODECOV_TOKEN }}" ,
264266 }
265267 config ["jobs" ]["pytest" ]["secrets" ] = secrets
266- if not no_macos :
267- with_section ["macos-python-version" ] = DoubleQuotedScalarString ("3.9" )
268+ if macos_python_version is not None :
269+ with_section ["macos-python-version" ] = DoubleQuotedScalarString (
270+ macos_python_version
271+ )
268272 if skip_tests :
269273 with_section ["skipped-python-versions" ] = " " .join (skip_tests )
270274 if single_threaded :
0 commit comments