We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b656ae3 commit 6c51281Copy full SHA for 6c51281
mypy/stubdoc.py
@@ -273,9 +273,8 @@ def add_token(self, token: tokenize.TokenInfo) -> None:
273
self.reset()
274
return
275
self.keyword_only = len(self.args)
276
- self.keyword_only_index = (
277
- self.keyword_only + 1 if self.pos_only is not None else 0
278
- )
+ pos_offset = 1 if self.pos_only is not None else 0
+ self.keyword_only_index = self.keyword_only + pos_offset
279
self.accumulator = ""
280
else:
281
if self.accumulator.startswith("*"):
0 commit comments