Skip to content
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

Probable typo in Arg Clinic's linear_format() #70504

Closed
vadmium opened this issue Feb 9, 2016 · 5 comments
Closed

Probable typo in Arg Clinic's linear_format() #70504

vadmium opened this issue Feb 9, 2016 · 5 comments

Comments

@vadmium
Copy link
Member

vadmium commented Feb 9, 2016

BPO 26316
Nosy @vstinner, @larryhastings, @vadmium

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2016-02-14.04:35:14.046>
created_at = <Date 2016-02-09.02:32:33.807>
labels = ['expert-argument-clinic']
title = "Probable typo in Arg Clinic's linear_format()"
updated_at = <Date 2016-02-14.04:35:14.045>
user = 'https://github.com/vadmium'

bugs.python.org fields:

activity = <Date 2016-02-14.04:35:14.045>
actor = 'martin.panter'
assignee = 'none'
closed = True
closed_date = <Date 2016-02-14.04:35:14.046>
closer = 'martin.panter'
components = ['Argument Clinic']
creation = <Date 2016-02-09.02:32:33.807>
creator = 'martin.panter'
dependencies = []
files = []
hgrepos = []
issue_num = 26316
keywords = []
message_count = 5.0
messages = ['259908', '259912', '260050', '260260', '260262']
nosy_count = 4.0
nosy_names = ['vstinner', 'larry', 'python-dev', 'martin.panter']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue26316'
versions = ['Python 3.5', 'Python 3.6']

@vadmium
Copy link
Member Author

vadmium commented Feb 9, 2016

The curly bracket separator is assigned to “curl”, but then the previous “curly” variable is tested:

https://hg.python.org/cpython/annotate/3.5/Tools/clinic/clinic.py#l202

name, curl, trailing = trailing.partition('}')
if not curly or name not in kwargs:
...

I presume the fix is to assign to “curly”, but I haven’t had a chance to figure out how to test it yet.

@larryhastings
Copy link
Contributor

Yeah, change "curl" to "curly". If you commit the fix without a test case I'd forgive you. Or I can do it if that makes you nervous.

@vstinner
Copy link
Member

Go ahead.

@terryjreedy terryjreedy changed the title Probable typo in Arg Clinic’s linear_format() Probable typo in Arg Clinic's linear_format() Feb 12, 2016
@python-dev
Copy link
Mannequin

python-dev mannequin commented Feb 14, 2016

New changeset aec2eae8933e by Martin Panter in branch '3.5':
Issue bpo-26316: Fix variable name typo in Argument Clinic
https://hg.python.org/cpython/rev/aec2eae8933e

New changeset 6c122e4e1cb2 by Martin Panter in branch 'default':
Issue bpo-26316: Merge Arg Clinic fix from 3.5
https://hg.python.org/cpython/rev/6c122e4e1cb2

@vadmium
Copy link
Member Author

vadmium commented Feb 14, 2016

I did look into testing, but I gave up. :) The test file doesn’t even import. I got the following error (without exception or traceback), cause by the line that reads “c = clinic.Clinic(language='C')”:

$ (cd Tools/clinic/ && ../../python clinic_test.py)
Error:
Destination does not exist: 'file'
[Exit 255]

@vadmium vadmium closed this as completed Feb 14, 2016
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants