@@ -62,7 +62,7 @@ def new(self, type: str = "blank") -> int:
62
62
def edit (self , challenge : str , dockerfile : bool = False ) -> int :
63
63
log .debug (f"edit: { challenge } (dockerfile={ dockerfile } )" )
64
64
65
- challenge_instance = self .resolve_single_challenge (challenge )
65
+ challenge_instance = self ._resolve_single_challenge (challenge )
66
66
if not challenge_instance :
67
67
return 1
68
68
@@ -94,7 +94,7 @@ def show(self, challenge: str, color=True) -> int:
94
94
def view (self , challenge : str , color = True ) -> int :
95
95
log .debug (f"view: { challenge } (color={ color } )" )
96
96
97
- challenge_instance = self .resolve_single_challenge (challenge )
97
+ challenge_instance = self ._resolve_single_challenge (challenge )
98
98
if not challenge_instance :
99
99
return 1
100
100
@@ -450,13 +450,13 @@ def install(
450
450
log .debug (f"install: (challenge={ challenge } , force={ force } , hidden={ hidden } , ignore={ ignore } )" )
451
451
452
452
if challenge :
453
- challenge_instance = self .resolve_single_challenge (challenge )
453
+ challenge_instance = self ._resolve_single_challenge (challenge )
454
454
if not challenge_instance :
455
455
return 1
456
456
457
457
local_challenges = [challenge_instance ]
458
458
else :
459
- local_challenges = self .resolve_all_challenges ()
459
+ local_challenges = self ._resolve_all_challenges ()
460
460
461
461
if isinstance (ignore , str ):
462
462
ignore = (ignore ,)
@@ -527,13 +527,13 @@ def sync(self, challenge: str = None, ignore: Union[str, Tuple[str]] = ()) -> in
527
527
log .debug (f"sync: (challenge={ challenge } , ignore={ ignore } )" )
528
528
529
529
if challenge :
530
- challenge_instance = self .resolve_single_challenge (challenge )
530
+ challenge_instance = self ._resolve_single_challenge (challenge )
531
531
if not challenge_instance :
532
532
return 1
533
533
534
534
local_challenges = [challenge_instance ]
535
535
else :
536
- local_challenges = self .resolve_all_challenges ()
536
+ local_challenges = self ._resolve_all_challenges ()
537
537
538
538
if isinstance (ignore , str ):
539
539
ignore = (ignore ,)
@@ -588,13 +588,13 @@ def deploy(
588
588
log .debug (f"deploy: (challenge={ challenge } , host={ host } , skip_login={ skip_login } )" )
589
589
590
590
if challenge :
591
- challenge_instance = self .resolve_single_challenge (challenge )
591
+ challenge_instance = self ._resolve_single_challenge (challenge )
592
592
if not challenge_instance :
593
593
return 1
594
594
595
595
challenges = [challenge_instance ]
596
596
else :
597
- challenges = self .resolve_all_challenges ()
597
+ challenges = self ._resolve_all_challenges ()
598
598
599
599
deployable_challenges , failed_deployments , failed_syncs = [], [], []
600
600
@@ -727,7 +727,7 @@ def lint(
727
727
) -> int :
728
728
log .debug (f"lint: (challenge={ challenge } , skip_hadolint={ skip_hadolint } , flag_format='{ flag_format } ')" )
729
729
730
- challenge_instance = self .resolve_single_challenge (challenge )
730
+ challenge_instance = self ._resolve_single_challenge (challenge )
731
731
if not challenge_instance :
732
732
return 1
733
733
@@ -745,7 +745,7 @@ def lint(
745
745
def healthcheck (self , challenge : Optional [str ] = None ) -> int :
746
746
log .debug (f"healthcheck: (challenge={ challenge } )" )
747
747
748
- challenge_instance = self .resolve_single_challenge (challenge )
748
+ challenge_instance = self ._resolve_single_challenge (challenge )
749
749
if not challenge_instance :
750
750
return 1
751
751
@@ -817,13 +817,13 @@ def mirror(
817
817
)
818
818
819
819
if challenge :
820
- challenge_instance = self .resolve_single_challenge (challenge )
820
+ challenge_instance = self ._resolve_single_challenge (challenge )
821
821
if not challenge_instance :
822
822
return 1
823
823
824
824
local_challenges = [challenge_instance ]
825
825
else :
826
- local_challenges = self .resolve_all_challenges ()
826
+ local_challenges = self ._resolve_all_challenges ()
827
827
828
828
if isinstance (ignore , str ):
829
829
ignore = (ignore ,)
@@ -873,13 +873,13 @@ def verify(self, challenge: str = None, ignore: Tuple[str] = ()) -> int:
873
873
log .debug (f"verify: (challenge={ challenge } , ignore={ ignore } )" )
874
874
875
875
if challenge :
876
- challenge_instance = self .resolve_single_challenge (challenge )
876
+ challenge_instance = self ._resolve_single_challenge (challenge )
877
877
if not challenge_instance :
878
878
return 1
879
879
880
880
local_challenges = [challenge_instance ]
881
881
else :
882
- local_challenges = self .resolve_all_challenges ()
882
+ local_challenges = self ._resolve_all_challenges ()
883
883
884
884
if isinstance (ignore , str ):
885
885
ignore = (ignore ,)
@@ -938,13 +938,13 @@ def format(self, challenge: Optional[str] = None) -> int:
938
938
log .debug (f"format: (challenge={ challenge } )" )
939
939
940
940
if challenge :
941
- challenge_instance = self .resolve_single_challenge (challenge )
941
+ challenge_instance = self ._resolve_single_challenge (challenge )
942
942
if not challenge_instance :
943
943
return 1
944
944
945
945
challenges = [challenge_instance ]
946
946
else :
947
- challenges = self .resolve_all_challenges ()
947
+ challenges = self ._resolve_all_challenges ()
948
948
949
949
failed_formats = []
950
950
for challenge_instance in challenges :
@@ -968,7 +968,7 @@ def format(self, challenge: Optional[str] = None) -> int:
968
968
return 1
969
969
970
970
@staticmethod
971
- def resolve_single_challenge (challenge : Optional [str ] = None ) -> Optional [Challenge ]:
971
+ def _resolve_single_challenge (challenge : Optional [str ] = None ) -> Optional [Challenge ]:
972
972
# if a challenge is specified
973
973
if challenge :
974
974
# check if it's a path to challenge.yml, or the current directory
@@ -994,7 +994,7 @@ def resolve_single_challenge(challenge: Optional[str] = None) -> Optional[Challe
994
994
return
995
995
996
996
@staticmethod
997
- def resolve_all_challenges () -> List [Challenge ]:
997
+ def _resolve_all_challenges () -> List [Challenge ]:
998
998
config = Config ()
999
999
challenge_keys = config .challenges .keys ()
1000
1000
0 commit comments