diff --git a/frictionless/portals/github/plugin.py b/frictionless/portals/github/plugin.py index 054fbdbd6e..328f9f4d14 100644 --- a/frictionless/portals/github/plugin.py +++ b/frictionless/portals/github/plugin.py @@ -49,11 +49,13 @@ def create_adapter( parsed_url = urlparse(source) splited_url = parsed_url.path.split("/")[1:] - if ( + has_expected_format = ( parsed_url.netloc == "github.com" and len(splited_url) < 1 and len(splited_url) > 2 - ): + ) + + if has_expected_format: control = control or GithubControl() control.user = splited_url[0] @@ -62,10 +64,6 @@ def create_adapter( return GithubAdapter(control) - else: - # Url has not an expected format - return - def select_control_class(self, type: Optional[str] = None): if type == "github": return GithubControl