Skip to content

Commit

Permalink
Switch to Black 2024 style
Browse files Browse the repository at this point in the history
  • Loading branch information
notatallshaw committed Aug 1, 2024
1 parent 2410b7e commit 3f5f79c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 22 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Homepage = "https://github.com/sarugaku/resolvelib"

[project.optional-dependencies]
lint = [
"black==23.12.1",
"black~=24.0",
"ruff",
"isort",
"mypy",
Expand Down
3 changes: 1 addition & 2 deletions src/resolvelib/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
from typing import Any, Protocol

class Preference(Protocol):
def __lt__(self, __other: Any) -> bool:
...
def __lt__(self, __other: Any) -> bool: ...


class AbstractProvider(Generic[RT, CT, KT]):
Expand Down
12 changes: 7 additions & 5 deletions tests/functional/cocoapods/test_resolvers_cocoapods.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,14 @@ def get_dependencies(self, candidate):

@pytest.fixture(
params=[
pytest.param(
os.path.join(CASE_DIR, n),
marks=pytest.mark.xfail(strict=True, reason=XFAIL_CASES[n]),
(
pytest.param(
os.path.join(CASE_DIR, n),
marks=pytest.mark.xfail(strict=True, reason=XFAIL_CASES[n]),
)
if n in XFAIL_CASES
else os.path.join(CASE_DIR, n)
)
if n in XFAIL_CASES
else os.path.join(CASE_DIR, n)
for n in CASE_NAMES
],
ids=[n[:-5] for n in CASE_NAMES],
Expand Down
10 changes: 1 addition & 9 deletions tests/functional/python/py2index.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,7 @@
import re
import sys
import urllib.parse
from typing import (
Dict,
Iterable,
Iterator,
List,
NamedTuple,
Tuple,
Union,
)
from typing import Dict, Iterable, Iterator, List, NamedTuple, Tuple, Union

import html5lib
import packaging.requirements
Expand Down
12 changes: 7 additions & 5 deletions tests/functional/python/test_resolvers_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,14 @@ def get_dependencies(self, candidate):

@pytest.fixture(
params=[
pytest.param(
os.path.join(CASE_DIR, n),
marks=pytest.mark.xfail(strict=True, reason=XFAIL_CASES[n]),
(
pytest.param(
os.path.join(CASE_DIR, n),
marks=pytest.mark.xfail(strict=True, reason=XFAIL_CASES[n]),
)
if n in XFAIL_CASES
else os.path.join(CASE_DIR, n)
)
if n in XFAIL_CASES
else os.path.join(CASE_DIR, n)
for n in CASE_NAMES
],
ids=[n[:-5] for n in CASE_NAMES],
Expand Down

0 comments on commit 3f5f79c

Please sign in to comment.