Skip to content

Commit 3026bee

Browse files
author
Scott Sanderson
committed
MAINT: Remove unused imports.
1 parent 2aabdfe commit 3026bee

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

interface/typecheck.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
Utilities for typed interfaces.
33
"""
44
from inspect import Parameter
5-
from itertools import dropwhile, starmap, takewhile, zip_longest
6-
from operator import contains
5+
from itertools import starmap, takewhile, zip_longest
76

87
from .functional import complement, dzip, valfilter
98

@@ -12,12 +11,19 @@ def compatible(impl_sig, iface_sig):
1211
"""
1312
Check whether ``impl_sig`` is compatible with ``iface_sig``.
1413
14+
Parameters
15+
----------
16+
impl_sig : inspect.Signature
17+
The signature of the implementation function.
18+
iface_sig : inspect.Signature
19+
The signature of the interface function.
20+
1521
In general, an implementation is compatible with an interface if any valid
1622
way of passing parameters to the interface method is also valid for the
1723
implementation.
1824
19-
The following differences are allowed between an implementation and its
20-
interface:
25+
Consequently, the following differences are allowed between the signature
26+
of an implementation methodand the signature of its interface definition:
2127
2228
1. An implementation may add new arguments to an interface iff:
2329
a. All new arguments have default values.

0 commit comments

Comments
 (0)