@@ -275,7 +275,7 @@ def _validate_address_name(cls, kind: str) -> str:
275275 # Parse the class name if the full path is passed. For example,
276276 # parsl.addresses.address_by_hostname and address_by_hostname should
277277 # both be valid.
278- cls_name = kind .split ('.' )[- 1 ]
278+ cls_name = kind .rsplit ('.' , maxsplit = 1 )[- 1 ]
279279 try :
280280 getattr (parsl .addresses , cls_name )
281281 except AttributeError as e :
@@ -349,7 +349,7 @@ class ProviderConfig(BaseModel):
349349 def _validate_provider_name (cls , kind : str ) -> str :
350350 # Parse the class name if the full path is passed. For example,
351351 # parsl.providers.SlurmProvider and SlurmProvider should both be valid.
352- cls_name = kind .split ('.' )[- 1 ]
352+ cls_name = kind .rsplit ('.' , maxsplit = 1 )[- 1 ]
353353 try :
354354 getattr (parsl .providers , cls_name )
355355 except AttributeError as e :
@@ -404,7 +404,7 @@ class LauncherConfig(BaseModel):
404404 def _validate_launcher_name (cls , kind : str ) -> str :
405405 # Parse the class name if the full path is passed. For example,
406406 # parsl.launchers.SrunLauncher and SrunLauncher should both be valid.
407- cls_name = kind .split ('.' )[- 1 ]
407+ cls_name = kind .rsplit ('.' , maxsplit = 1 )[- 1 ]
408408 try :
409409 getattr (parsl .launchers , cls_name )
410410 except AttributeError as e :
@@ -452,7 +452,7 @@ def _validate_manager_selector_name(cls, kind: str) -> str:
452452 # Parse the class name if the full path is passed. For example,
453453 # parsl.executors.high_throughput.manager_selector.RandomManagerSelector # noqa: E501
454454 # and RandomManagerSelector should both be valid.
455- cls_name = kind .split ('.' )[- 1 ]
455+ cls_name = kind .rsplit ('.' , maxsplit = 1 )[- 1 ]
456456 try :
457457 import parsl .executors .high_throughput .manager_selector
458458 except ImportError as e : # pragma: no cover
0 commit comments