diff --git a/src/cwe2/database.py b/src/cwe2/database.py index efaa87e..2ded3d0 100644 --- a/src/cwe2/database.py +++ b/src/cwe2/database.py @@ -50,12 +50,9 @@ def __str__(self): class Database: database_paths = ( [navigate_cwe.get(key).get("csv_file") for key in navigate_cwe.keys()] - + [external_mapping.get(key).get("csv_file") - for key in external_mapping.keys()] - + [helpful_view.get(key).get("csv_file") - for key in helpful_view.keys()] - + [obsolete_views.get(key).get("csv_file") - for key in obsolete_views.keys()] + + [external_mapping.get(key).get("csv_file") for key in external_mapping.keys()] + + [helpful_view.get(key).get("csv_file") for key in helpful_view.keys()] + + [obsolete_views.get(key).get("csv_file") for key in obsolete_views.keys()] ) cwe_files = {open(path, encoding="utf-8") for path in database_paths} diff --git a/src/cwe2/mappings.py b/src/cwe2/mappings.py index c7ad774..388a883 100644 --- a/src/cwe2/mappings.py +++ b/src/cwe2/mappings.py @@ -28,8 +28,7 @@ def get_data_file_path(package: str, resource: str) -> str: # Guard against non-existing files, or else importlib_resources.path # may raise a confusing TypeError. if not importlib_resources.is_resource(package, resource): - raise FileNotFoundError( - f"Python package '{package}' resource '{resource}' not found.") + raise FileNotFoundError(f"Python package '{package}' resource '{resource}' not found.") with importlib_resources.path(package, resource) as resource_path: return os.fspath(resource_path) diff --git a/tests/test_cwe.py b/tests/test_cwe.py index 53a677a..77b2a53 100644 --- a/tests/test_cwe.py +++ b/tests/test_cwe.py @@ -1,8 +1,8 @@ # # Copyright (c) Julian-Nash, Ziad Hany, nexB. Inc. and others. All rights reserved. # SPDX-License-Identifier: MIT -# See https://github.com/nexB/cwe2/blob/main/mit.LICENSE for the license text. -# See https://github.com/nexB/cwe2 for support or download. +# See https://github.com/aboutcode-org/cwe2/blob/main/mit.LICENSE for the license text. +# See https://github.com/aboutcode-org/cwe2 for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # from unittest import TestCase diff --git a/tests/test_skeleton_codestyle.py b/tests/test_skeleton_codestyle.py index 95fcb9f..446f095 100644 --- a/tests/test_skeleton_codestyle.py +++ b/tests/test_skeleton_codestyle.py @@ -3,7 +3,7 @@ # ScanCode is a trademark of nexB Inc. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. -# See https://github.com/nexB/skeleton for support or download. +# See https://github.com/aboutcode-org/skeleton for support or download. # See https://aboutcode.org for more information about nexB OSS projects. #