diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9f467f5..d820913 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,8 +25,8 @@ repos: hooks: - id: pyupgrade args: ['--py38-plus'] -- repo: https://github.com/pre-commit/mirrors-autopep8 - rev: v2.0.4 +- repo: https://github.com/hhatto/autopep8 + rev: v2.1.0 hooks: - id: autopep8 - repo: https://github.com/PyCQA/flake8 diff --git a/pypi_browser/packaging.py b/pypi_browser/packaging.py index 3b86cfe..ab10a98 100644 --- a/pypi_browser/packaging.py +++ b/pypi_browser/packaging.py @@ -13,7 +13,7 @@ def pep426_normalize(package_name: str) -> str: - return re.sub(r'[-_.]+', '-', package_name).lower() + return re.sub(r'[-_.]+', '-', package_name.strip()).lower() class UnsupportedPackageType(Exception):