Skip to content

Commit d89469a

Browse files
Fix typos found by codespell (#202)
1 parent 017d3a7 commit d89469a

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/resolvelib/providers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def find_matches(
103103
:param requirements: A mapping of requirements that all returned
104104
candidates must satisfy. Each key is an identifier, and the value
105105
an iterator of requirements for that dependency.
106-
:param incompatibilities: A mapping of known incompatibile candidates of
106+
:param incompatibilities: A mapping of known incompatible candidates of
107107
each dependency. Each key is an identifier, and the value an
108108
iterator of incompatibilities known to the resolver. All
109109
incompatibilities *must* be excluded from the return value.
@@ -180,7 +180,7 @@ def narrow_requirement_selection(
180180
Must return a non-empty subset of `identifiers`, with the default
181181
implementation being to return `identifiers` unchanged. Those `identifiers`
182182
will then be passed to the sort key `get_preference` to pick the most
183-
prefered requirement to attempt to pin, unless `narrow_requirement_selection`
183+
preferred requirement to attempt to pin, unless `narrow_requirement_selection`
184184
returns only 1 requirement, in which case that will be used without
185185
calling the sort key `get_preference`.
186186

src/resolvelib/resolvers/abstract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def resolve(self, requirements: Iterable[RT], **kwargs: Any) -> Result[RT, CT, K
3636
"""Take a collection of constraints, spit out the resolution result.
3737
3838
This returns a representation of the final resolution state, with one
39-
guarenteed attribute ``mapping`` that contains resolved candidates as
39+
guaranteed attribute ``mapping`` that contains resolved candidates as
4040
values. The keys are their respective identifiers.
4141
4242
:param requirements: A collection of constraints.

src/resolvelib/resolvers/resolution.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,10 @@ def _backjump(self, causes: list[RequirementInformation[RT, CT]]) -> bool:
410410
return False
411411

412412
def _extract_causes(
413-
self, criteron: list[Criterion[RT, CT]]
413+
self, criteria: list[Criterion[RT, CT]]
414414
) -> list[RequirementInformation[RT, CT]]:
415-
"""Extract causes from list of criterion and deduplicate"""
416-
return list({id(i): i for c in criteron for i in c.information}.values())
415+
"""Extract causes from list of criteria and deduplicate"""
416+
return list({id(i): i for c in criteria for i in c.information}.values())
417417

418418
def resolve(self, requirements: Iterable[RT], max_rounds: int) -> State[RT, CT, KT]:
419419
if self._states:

tests/functional/python/test_resolvers_python.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def test_resolver(provider, reporter):
235235

236236
unexpected_versions = set(versions).intersection(visited_versions[name])
237237
assert not unexpected_versions, (
238-
f"Unexpcted versions visited {name}: {', '.join(unexpected_versions)}"
238+
f"Unexpected versions visited {name}: {', '.join(unexpected_versions)}"
239239
)
240240

241241

@@ -270,5 +270,5 @@ def test_no_optimistic_backtracking_resolver(provider, reporter, monkeypatch):
270270

271271
unexpected_versions = set(versions).intersection(visited_versions[name])
272272
assert not unexpected_versions, (
273-
f"Unexpcted versions visited {name}: {', '.join(unexpected_versions)}"
273+
f"Unexpected versions visited {name}: {', '.join(unexpected_versions)}"
274274
)

tests/functional/swift-package-manager/test_resolvers_swift.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def _parse_version(s):
2626

2727

2828
def _is_version_allowed(version, ranges):
29-
"""Check version compatibility with Sematic Versioning."""
29+
"""Check version compatibility with Semantic Versioning."""
3030
for r in ranges:
3131
r = _parse_version(r)
3232
if r[0] != version[0]:

0 commit comments

Comments
 (0)