Loading src/parsers/gitlab.py +13 −8 Changes for src/parsers/gitlab.py: 13 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -305,6 +305,7 @@ class GitLab: stack: List[str], root_directory: Path, working_directory: Path, parent_path: str, ) -> None: # Parse nested include Loading Loading @@ -337,6 +338,7 @@ class GitLab: root_directory, working_directory, include_dict, parent_path, ) # Parse project node Loading @@ -346,9 +348,10 @@ class GitLab: stack, working_directory, include_dict, parent_path, ) # Include local, pylint: disable=too-many-arguments,too-many-locals # Include local, pylint: disable=too-many-arguments,too-many-locals,too-many-positional-arguments @staticmethod def __include_local( data: YAML.Data, Loading @@ -356,10 +359,10 @@ class GitLab: root_directory: Path, working_directory: Path, include_dict: dict, # type: ignore[type-arg] parent_path: str, ) -> None: # Variables include_parent: str = stack[-1] if stack else '' include_path: str = include_dict['local'] # Handle include relative paths Loading Loading @@ -394,6 +397,7 @@ class GitLab: stack, root_directory, file_path.parent, resolved_path, ) # Agregate data Loading @@ -404,12 +408,12 @@ class GitLab: # Empty included file else: raise SyntaxError( f'Empty "{file_path}" file included in "{include_parent}"') f'Empty "{file_path}" file included in "{parent_path}"') # Missing file failure else: raise FileNotFoundError( f'Missing "{file_path}" file included in "{include_parent}"') f'Missing "{file_path}" file included in "{parent_path}"') # Include project @staticmethod Loading @@ -418,10 +422,10 @@ class GitLab: stack: List[str], working_directory: Path, include_dict: dict, # type: ignore[type-arg] parent_path: str, ) -> None: # Variables include_parent: str = stack[-1] if stack else '' project_path: str = '' project_url: str = include_dict['project'] Loading Loading @@ -477,6 +481,7 @@ class GitLab: stack, project_working_directory, project_working_directory, str(file_path), ) # Agregate data Loading @@ -487,13 +492,12 @@ class GitLab: # Empty included file else: raise SyntaxError( f'Empty "{file_path}" file included in "{include_parent}"' ) f'Empty "{file_path}" file included in "{parent_path}"') # Missing file failure else: raise FileNotFoundError( f'Missing "{file_path}" file included in "{include_parent}"') f'Missing "{file_path}" file included in "{parent_path}"') # Local, pylint: disable=too-many-branches,too-many-statements @staticmethod Loading Loading @@ -1011,6 +1015,7 @@ class GitLab: [Paths.resolve(self.__options.path / self.__options.configuration)], self.__options.path, self.__options.path, Paths.resolve(self.__options.path / self.__options.configuration), ) # Resolve YAML nodes Loading Loading
src/parsers/gitlab.py +13 −8 Changes for src/parsers/gitlab.py: 13 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -305,6 +305,7 @@ class GitLab: stack: List[str], root_directory: Path, working_directory: Path, parent_path: str, ) -> None: # Parse nested include Loading Loading @@ -337,6 +338,7 @@ class GitLab: root_directory, working_directory, include_dict, parent_path, ) # Parse project node Loading @@ -346,9 +348,10 @@ class GitLab: stack, working_directory, include_dict, parent_path, ) # Include local, pylint: disable=too-many-arguments,too-many-locals # Include local, pylint: disable=too-many-arguments,too-many-locals,too-many-positional-arguments @staticmethod def __include_local( data: YAML.Data, Loading @@ -356,10 +359,10 @@ class GitLab: root_directory: Path, working_directory: Path, include_dict: dict, # type: ignore[type-arg] parent_path: str, ) -> None: # Variables include_parent: str = stack[-1] if stack else '' include_path: str = include_dict['local'] # Handle include relative paths Loading Loading @@ -394,6 +397,7 @@ class GitLab: stack, root_directory, file_path.parent, resolved_path, ) # Agregate data Loading @@ -404,12 +408,12 @@ class GitLab: # Empty included file else: raise SyntaxError( f'Empty "{file_path}" file included in "{include_parent}"') f'Empty "{file_path}" file included in "{parent_path}"') # Missing file failure else: raise FileNotFoundError( f'Missing "{file_path}" file included in "{include_parent}"') f'Missing "{file_path}" file included in "{parent_path}"') # Include project @staticmethod Loading @@ -418,10 +422,10 @@ class GitLab: stack: List[str], working_directory: Path, include_dict: dict, # type: ignore[type-arg] parent_path: str, ) -> None: # Variables include_parent: str = stack[-1] if stack else '' project_path: str = '' project_url: str = include_dict['project'] Loading Loading @@ -477,6 +481,7 @@ class GitLab: stack, project_working_directory, project_working_directory, str(file_path), ) # Agregate data Loading @@ -487,13 +492,12 @@ class GitLab: # Empty included file else: raise SyntaxError( f'Empty "{file_path}" file included in "{include_parent}"' ) f'Empty "{file_path}" file included in "{parent_path}"') # Missing file failure else: raise FileNotFoundError( f'Missing "{file_path}" file included in "{include_parent}"') f'Missing "{file_path}" file included in "{parent_path}"') # Local, pylint: disable=too-many-branches,too-many-statements @staticmethod Loading Loading @@ -1011,6 +1015,7 @@ class GitLab: [Paths.resolve(self.__options.path / self.__options.configuration)], self.__options.path, self.__options.path, Paths.resolve(self.__options.path / self.__options.configuration), ) # Resolve YAML nodes Loading