@@ -194,17 +194,17 @@ def unique_repo_name(remote_repos_path: pathlib.Path, max_retries: int = 15) ->
194194InitCmdArgs : "TypeAlias" = Optional [list [str ]]
195195
196196
197- class CreateProjectCallbackProtocol (Protocol ):
197+ class CreateRepoPostInitFn (Protocol ):
198198 def __call__ (self , remote_repo_path : pathlib .Path ) -> None :
199199 ...
200200
201201
202- class CreateProjectCallbackFixtureProtocol (Protocol ):
202+ class CreateRepoPytestFixtureFn (Protocol ):
203203 def __call__ (
204204 self ,
205205 remote_repos_path : pathlib .Path = ...,
206206 remote_repo_name : Optional [str ] = ...,
207- remote_repo_post_init : Optional [CreateProjectCallbackProtocol ] = ...,
207+ remote_repo_post_init : Optional [CreateRepoPostInitFn ] = ...,
208208 init_cmd_args : InitCmdArgs = ...,
209209 ) -> pathlib .Path :
210210 ...
@@ -216,7 +216,7 @@ def __call__(
216216def _create_git_remote_repo (
217217 remote_repos_path : pathlib .Path ,
218218 remote_repo_name : str ,
219- remote_repo_post_init : Optional [CreateProjectCallbackProtocol ] = None ,
219+ remote_repo_post_init : Optional [CreateRepoPostInitFn ] = None ,
220220 init_cmd_args : InitCmdArgs = DEFAULT_GIT_REMOTE_REPO_CMD_ARGS ,
221221) -> pathlib .Path :
222222 if init_cmd_args is None :
@@ -234,13 +234,13 @@ def _create_git_remote_repo(
234234@skip_if_git_missing
235235def create_git_remote_repo (
236236 remote_repos_path : pathlib .Path ,
237- ) -> CreateProjectCallbackFixtureProtocol :
238- """Factory. Create git remote repo to for clone / push purposes"""
237+ ) -> CreateRepoPytestFixtureFn :
238+ """Factory. Create git remote repo to for clone / push purposes. """
239239
240240 def fn (
241241 remote_repos_path : pathlib .Path = remote_repos_path ,
242242 remote_repo_name : Optional [str ] = None ,
243- remote_repo_post_init : Optional [CreateProjectCallbackProtocol ] = None ,
243+ remote_repo_post_init : Optional [CreateRepoPostInitFn ] = None ,
244244 init_cmd_args : InitCmdArgs = DEFAULT_GIT_REMOTE_REPO_CMD_ARGS ,
245245 ) -> pathlib .Path :
246246 return _create_git_remote_repo (
@@ -278,7 +278,7 @@ def git_remote_repo(remote_repos_path: pathlib.Path) -> pathlib.Path:
278278def _create_svn_remote_repo (
279279 remote_repos_path : pathlib .Path ,
280280 remote_repo_name : str ,
281- remote_repo_post_init : Optional [CreateProjectCallbackProtocol ] = None ,
281+ remote_repo_post_init : Optional [CreateRepoPostInitFn ] = None ,
282282 init_cmd_args : InitCmdArgs = None ,
283283) -> pathlib .Path :
284284 """Create a test SVN repo to for checkout / commit purposes"""
@@ -318,13 +318,13 @@ def svn_remote_repo_single_commit_post_init(remote_repo_path: pathlib.Path) -> N
318318@skip_if_svn_missing
319319def create_svn_remote_repo (
320320 remote_repos_path : pathlib .Path ,
321- ) -> CreateProjectCallbackFixtureProtocol :
321+ ) -> CreateRepoPytestFixtureFn :
322322 """Pre-made svn repo, bare, used as a file:// remote to checkout and commit to."""
323323
324324 def fn (
325325 remote_repos_path : pathlib .Path = remote_repos_path ,
326326 remote_repo_name : Optional [str ] = None ,
327- remote_repo_post_init : Optional [CreateProjectCallbackProtocol ] = None ,
327+ remote_repo_post_init : Optional [CreateRepoPostInitFn ] = None ,
328328 init_cmd_args : InitCmdArgs = None ,
329329 ) -> pathlib .Path :
330330 return _create_svn_remote_repo (
@@ -355,7 +355,7 @@ def svn_remote_repo(remote_repos_path: pathlib.Path) -> pathlib.Path:
355355def _create_hg_remote_repo (
356356 remote_repos_path : pathlib .Path ,
357357 remote_repo_name : str ,
358- remote_repo_post_init : Optional [CreateProjectCallbackProtocol ] = None ,
358+ remote_repo_post_init : Optional [CreateRepoPostInitFn ] = None ,
359359 init_cmd_args : InitCmdArgs = None ,
360360) -> pathlib .Path :
361361 """Create a test hg repo to for checkout / commit purposes"""
@@ -384,13 +384,13 @@ def create_hg_remote_repo(
384384 remote_repos_path : pathlib .Path ,
385385 hgconfig : pathlib .Path ,
386386 set_home : pathlib .Path ,
387- ) -> CreateProjectCallbackFixtureProtocol :
387+ ) -> CreateRepoPytestFixtureFn :
388388 """Pre-made hg repo, bare, used as a file:// remote to checkout and commit to."""
389389
390390 def fn (
391391 remote_repos_path : pathlib .Path = remote_repos_path ,
392392 remote_repo_name : Optional [str ] = None ,
393- remote_repo_post_init : Optional [CreateProjectCallbackProtocol ] = None ,
393+ remote_repo_post_init : Optional [CreateRepoPostInitFn ] = None ,
394394 init_cmd_args : InitCmdArgs = None ,
395395 ) -> pathlib .Path :
396396 return _create_hg_remote_repo (
@@ -465,9 +465,9 @@ def add_doctest_fixtures(
465465 tmp_path : pathlib .Path ,
466466 set_home : pathlib .Path ,
467467 gitconfig : pathlib .Path ,
468- create_git_remote_repo : CreateProjectCallbackFixtureProtocol ,
469- create_svn_remote_repo : CreateProjectCallbackFixtureProtocol ,
470- create_hg_remote_repo : CreateProjectCallbackFixtureProtocol ,
468+ create_git_remote_repo : CreateRepoPytestFixtureFn ,
469+ create_svn_remote_repo : CreateRepoPytestFixtureFn ,
470+ create_hg_remote_repo : CreateRepoPytestFixtureFn ,
471471 git_repo : pathlib .Path ,
472472) -> None :
473473 from _pytest .doctest import DoctestItem
0 commit comments