Commit 0b85c9ca authored by Christian Meeßen's avatar Christian Meeßen
Browse files

Fix orthography

parent bb3ba5f8
...@@ -93,14 +93,14 @@ class LanguageHandler(ABC): ...@@ -93,14 +93,14 @@ class LanguageHandler(ABC):
self.deps[dependency_name].update(versions_str.split(",")) self.deps[dependency_name].update(versions_str.split(","))
if ( if (
dependency_name in self.errors dependency_name in self.errors
and "version not specified" in self.errors[dependency_name] and "Version not specified" in self.errors[dependency_name]
): ):
self.errors[dependency_name].remove("version not specified") self.errors[dependency_name].remove("Version not specified")
if len(self.errors[dependency_name]) == 0: if len(self.errors[dependency_name]) == 0:
del self.errors[dependency_name] del self.errors[dependency_name]
def _add_error(self, dependency_name: str, error_text: str): def _add_error(self, dependency_name: str, error_text: str):
if error_text == "version not specified": if error_text == "Version not specified":
if dependency_name in self.deps or dependency_name in self.dev_deps: if dependency_name in self.deps or dependency_name in self.dev_deps:
return return
...@@ -117,8 +117,8 @@ class LanguageHandler(ABC): ...@@ -117,8 +117,8 @@ class LanguageHandler(ABC):
self.dev_deps.add(dependency_name) self.dev_deps.add(dependency_name)
if ( if (
dependency_name in self.errors dependency_name in self.errors
and "version not specified" in self.errors[dependency_name] and "Version not specified" in self.errors[dependency_name]
): ):
self.errors[dependency_name].remove("version not specified") self.errors[dependency_name].remove("Version not specified")
if len(self.errors[dependency_name]) == 0: if len(self.errors[dependency_name]) == 0:
del self.errors[dependency_name] del self.errors[dependency_name]
...@@ -100,7 +100,7 @@ class Node(LanguageHandler): ...@@ -100,7 +100,7 @@ class Node(LanguageHandler):
) )
elif version == "": elif version == "":
self._add_error( self._add_error(
dependency_name=dep, error_text="version not specified" dependency_name=dep, error_text="Version not specified"
) )
else: else:
self._add_dep(dependency_name=dep, versions_str=version) self._add_dep(dependency_name=dep, versions_str=version)
......
...@@ -139,7 +139,7 @@ class Python(LanguageHandler): ...@@ -139,7 +139,7 @@ class Python(LanguageHandler):
if "version" not in version: if "version" not in version:
self._add_error( self._add_error(
dependency_name=dependency.lower(), dependency_name=dependency.lower(),
error_text="version not specified", error_text="Version not specified",
) )
else: else:
self._add_dep( self._add_dep(
...@@ -175,7 +175,7 @@ class Python(LanguageHandler): ...@@ -175,7 +175,7 @@ class Python(LanguageHandler):
else: else:
self._add_error( self._add_error(
dependency_name=package.lower(), dependency_name=package.lower(),
error_text="version not specified", error_text="Version not specified",
) )
if "default" in pipfile_lock_dict: if "default" in pipfile_lock_dict:
...@@ -240,7 +240,7 @@ class Python(LanguageHandler): ...@@ -240,7 +240,7 @@ class Python(LanguageHandler):
else: else:
self._add_error( self._add_error(
dependency_name=libname.lower(), dependency_name=libname.lower(),
error_text="version not specified", error_text="Version not specified",
) )
def parse_requirements_txt(self, file_path: str) -> None: def parse_requirements_txt(self, file_path: str) -> None:
...@@ -271,7 +271,7 @@ class Python(LanguageHandler): ...@@ -271,7 +271,7 @@ class Python(LanguageHandler):
if match is None: if match is None:
self._add_error( self._add_error(
dependency_name=stripped_down_line.lower(), dependency_name=stripped_down_line.lower(),
error_text="version not specified", error_text="Version not specified",
) )
else: else:
libname = stripped_down_line[: match.start()] libname = stripped_down_line[: match.start()]
......
...@@ -115,9 +115,9 @@ class ListUsedLicenses(Service): ...@@ -115,9 +115,9 @@ class ListUsedLicenses(Service):
""" """
md_result = f"> **Description: {self.description}**\n\n" md_result = f"> **Description: {self.description}**\n\n"
md_result += "#### found licenses\n\n" md_result += "#### Found Licenses\n\n"
md_result += "|license|libraries|\n" md_result += "| License | Libraries |\n"
md_result += "|---|---|\n" md_result += "|---------|-----------|\n"
# pylint: disable=W0622 # pylint: disable=W0622
for license in self.libraries_per_license: for license in self.libraries_per_license:
lib_list = " <br> ".join(self.libraries_per_license[license]) lib_list = " <br> ".join(self.libraries_per_license[license])
...@@ -125,7 +125,7 @@ class ListUsedLicenses(Service): ...@@ -125,7 +125,7 @@ class ListUsedLicenses(Service):
md_result += "\n" md_result += "\n"
if len(self.errors) > 0: if len(self.errors) > 0:
md_result += "#### errors\n\n" md_result += "#### Errors\n\n"
for language in self.errors: for language in self.errors:
md_result += f"##### {language}\n\n" md_result += f"##### {language}\n\n"
for lib in self.errors[language]: for lib in self.errors[language]:
...@@ -141,7 +141,7 @@ class ListUsedLicenses(Service): ...@@ -141,7 +141,7 @@ class ListUsedLicenses(Service):
Generates a cli version of the result as a chapter for a report. Generates a cli version of the result as a chapter for a report.
""" """
cli_result = f"Description: {self.description}\n\n" cli_result = f"Description: {self.description}\n\n"
cli_result += "##### found licenses #####\n" cli_result += "##### Found Licenses #####\n"
# pylint: disable=W0622 # pylint: disable=W0622
for license in self.libraries_per_license: for license in self.libraries_per_license:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment