@@ -22,15 +22,13 @@ def __init__(self, translators: "Optional[List[Type[TranslatorSpec]]]"=None):
2222 # Use user-specified translators
2323 self .translators = translators
2424 else :
25- # Use built-in translators
26- self .translators = [
25+ # Use plugin translators & built-in
26+ self .translators = get_translator_plugins ()
27+ self .translators .extend ([
2728 GitHub ,
2829 GitLab ,
29- Bitbucket
30- ]
31-
32- # .. and discover any plugins
33- self .translators .extend (get_translator_plugins ())
30+ Bitbucket ,
31+ ])
3432
3533 def get_source_url (self , path : str , line : "Optional[Union[int, Tuple[int, int]]]" = None , exact_commit : bool = False ) -> str :
3634 """
@@ -66,7 +64,7 @@ def get_source_url(self, path: str, line: "Optional[Union[int, Tuple[int, int]]]
6664 return translator .get_source_url (remote , info )
6765
6866
69- @functools .lru_cache
67+ @functools .lru_cache ( maxsize = None )
7068 def _get_target_info (self , path :str , exact_commit : bool = False ) -> 'Tuple[str, dict]' :
7169 """
7270 Collects relevant Git information about the target path.
@@ -113,7 +111,7 @@ def _get_target_info(self, path:str, exact_commit: bool = False) -> 'Tuple[str,
113111
114112 return remote , info
115113
116- @functools .lru_cache
114+ @functools .lru_cache ( maxsize = None )
117115 def _lookup_translator (self , remote :str ) -> 'Optional[Type[TranslatorSpec]]' :
118116 for t in self .translators :
119117 if t .is_match (remote ):
0 commit comments