diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6981ccee..6889a85fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: fetch-depth: 0 - uses: codespell-project/actions-codespell@2391250ab05295bddd51e36a8c6295edb6343b0e with: - ignore_words_list: datas + ignore_words_list: datas re-use - name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} uses: actions/setup-python@v4 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 954ce2d7f..0d9d692cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Infrastructure +* Fix gathering licenses of typeshed libraries +* Fix spellcheck erroring out on LICENSE file + ## [3.10.1] - 2023-09-27 ### Fixed diff --git a/b2/console_tool.py b/b2/console_tool.py index 39e008372..7c526f510 100644 --- a/b2/console_tool.py +++ b/b2/console_tool.py @@ -3454,6 +3454,8 @@ class License(Command): # pragma: no cover 'https://raw.githubusercontent.com/PythonCharmers/python-future/master/LICENSE.txt', 'pefile': 'https://raw.githubusercontent.com/erocarrera/pefile/master/LICENSE', + 'https://github.com/python/typeshed': + 'https://raw.githubusercontent.com/python/typeshed/main/LICENSE', } class NormalizingStringIO(io.StringIO): @@ -3591,8 +3593,12 @@ def _get_single_license(self, module_dict: dict): assert 'MIT License' in license_ # let's make sure the license is still there elif module_name == 'b2sdk': license_ = (pathlib.Path(b2sdk.__file__).parent / 'LICENSE').read_text() - elif module_name in self.LICENSES: - license_ = self._fetch_license_from_url(self.LICENSES[module_name]) + else: + license_url = self.LICENSES.get(module_name) or self.LICENSES.get( + module_dict.get('URL') + ) + if license_url: + license_ = self._fetch_license_from_url(license_url) assert license_ != piplicenses.LICENSE_UNKNOWN, module_name