Skip to content

Commit 33c819f

Browse files
committed
Merge branch 'overloads' of https://github.com/erictraut/typing into overloads
* 'overloads' of https://github.com/erictraut/typing: [pre-commit.ci] auto fixes from pre-commit.com hooks # Conflicts: # docs/spec/overload.rst
2 parents 5ca254e + de81026 commit 33c819f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/spec/overload.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ should report an error::
163163
def func(x: str, /) -> str: ...
164164
@overload
165165
def func(x: int) -> int: ...
166-
166+
167167
# This implementation is inconsistent with the second overload
168168
# because it does not accept a keyword argument ``x`` and the
169169
# the overload's return type ``int`` is not assignable to the
@@ -203,7 +203,7 @@ Currently pyright copies the exemption. Do we want to codify this or leave it
203203
out?]
204204

205205
If all arguments accepted by an overload are also always accepted by
206-
an earlier overload, the two overloads are said to "fully overlap".
206+
an earlier overload, the two overloads are said to "fully overlap".
207207
In this case, the latter overload will never be used. This condition
208208
is indicative of a programming error and should be reported by type
209209
checkers::
@@ -376,7 +376,7 @@ Example 3::
376376
def example3(x: int, y: int) -> tuple[int, int]: ...
377377
@overload
378378
def example3(*args: int) -> tuple[int, ...]: ...
379-
379+
380380
def test():
381381
# Step 1 eliminates second overload. Step 4 and
382382
# step 5 do not apply. Step 6 picks the first

0 commit comments

Comments
 (0)