Skip to content

Commit

Permalink
chore: ruff moved to astral-sh (#62)
Browse files Browse the repository at this point in the history
* chore: ruff moved to astral-sh

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply suggestions from code review

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
henryiii and pre-commit-ci[bot] authored Jul 11, 2023
1 parent fca79df commit 675172f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.263"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.275"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
10 changes: 5 additions & 5 deletions pyproject_metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def key(self) -> str | None: # pragma: no cover
return self._key


class RFC822Message():
class RFC822Message:
'''Python-flavored RFC 822 message implementation.'''

def __init__(self) -> None:
Expand Down Expand Up @@ -64,7 +64,7 @@ def __bytes__(self) -> bytes:
return str(self).encode()


class DataFetcher():
class DataFetcher:
def __init__(self, data: Mapping[str, Any]) -> None:
self._data = data

Expand Down Expand Up @@ -175,7 +175,7 @@ class Readme(typing.NamedTuple):


@dataclasses.dataclass
class StandardMetadata():
class StandardMetadata:
name: str
version: packaging.version.Version | None = None
description: str | None = None
Expand Down Expand Up @@ -448,7 +448,7 @@ def _get_dependencies(fetcher: DataFetcher) -> list[packaging.requirements.Requi
except packaging.requirements.InvalidRequirement as e:
raise ConfigurationError(
'Field "project.dependencies" contains an invalid PEP 508 '
f'requirement string "{req}" ("{str(e)}")'
f'requirement string "{req}" ("{e}")'
) from None
return requirements

Expand Down Expand Up @@ -483,7 +483,7 @@ def _get_optional_dependencies(fetcher: DataFetcher) -> dict[str, list[packaging
except packaging.requirements.InvalidRequirement as e:
raise ConfigurationError(
f'Field "project.optional-dependencies.{extra}" contains '
f'an invalid PEP 508 requirement string "{req}" ("{str(e)}")'
f'an invalid PEP 508 requirement string "{req}" ("{e}")'
) from None
return dict(requirements_dict)

Expand Down

0 comments on commit 675172f

Please sign in to comment.