Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: ruff moved to astral-sh #62

Merged
merged 3 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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!s}")'
henryiii marked this conversation as resolved.
Show resolved Hide resolved
) 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!s}")'
henryiii marked this conversation as resolved.
Show resolved Hide resolved
) from None
return dict(requirements_dict)

Expand Down