Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 10, 2023
1 parent cb7a672 commit 2a63d10
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wheel/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import functools
import itertools
import re
import os.path
import re
import textwrap
from email.message import Message
from email.parser import Parser
Expand All @@ -16,7 +16,7 @@


def _nonblank(str):
return str and not str.startswith('#')
return str and not str.startswith("#")


@functools.singledispatch
Expand Down Expand Up @@ -72,14 +72,14 @@ def safe_extra(extra):
Any runs of non-alphanumeric characters are replaced with a single '_',
and the result is always lowercased.
"""
return re.sub('[^A-Za-z0-9.-]+', '_', extra).lower()
return re.sub("[^A-Za-z0-9.-]+", "_", extra).lower()


def safe_name(name):
"""Convert an arbitrary string to a standard distribution name
Any runs of non-alphanumeric/. characters are replaced with a single '-'.
"""
return re.sub('[^A-Za-z0-9.]+', '-', name)
return re.sub("[^A-Za-z0-9.]+", "-", name)


def requires_to_requires_dist(requirement: Requirement) -> str:
Expand Down

0 comments on commit 2a63d10

Please sign in to comment.