8000 gh-86457: Fix signature for code.replace(). by serhiy-storchaka · Pull Request #23199 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-86457: Fix signature for code.replace(). #23199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 7, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into clinic-code-replace
  • Loading branch information
serhiy-storchaka committed Aug 7, 2023
commit 4ddf71428f560c7bee37f86c8f973daa31eae526
6 changes: 3 additions & 3 deletions Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5505,7 +5505,7 @@ def format_docstring(self) -> str:
assert isinstance(parameters[0].converter, self_converter)
# self is always positional-only.
assert parameters[0].is_positional_only()
parameters[0].right_bracket_count = 0
assert parameters[0].right_bracket_count == 0
positional_only = True
for p in parameters[1:]:
if not p.is_positional_only():
Expand All @@ -5520,7 +5520,7 @@ def format_docstring(self) -> str:

right_bracket_count = 0

def fix_right_bracket_count(desired):
def fix_right_bracket_count(desired: int) -> str:
nonlocal right_bracket_count
s = ''
while right_bracket_count < desired:
Expand Down Expand Up @@ -5554,7 +5554,7 @@ def fix_right_bracket_count(desired):
last_p = parameters[-1]
line_length = len(''.join(text))
indent = " " * line_length
def add_parameter(text):
def add_parameter(text: str) -> None:
nonlocal line_length
nonlocal first_parameter
if first_parameter:
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
0