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

[easy] undefined name in Lib/idlelib/zzdummy.py #84640

Closed
vstinner opened this issue Apr 30, 2020 · 4 comments
Closed

[easy] undefined name in Lib/idlelib/zzdummy.py #84640

vstinner opened this issue Apr 30, 2020 · 4 comments
Assignees
Labels
3.9 only security fixes easy topic-IDLE

Comments

@vstinner
Copy link
Member

BPO 40460
Nosy @terryjreedy, @vstinner
PRs
  • bpo-40460: Fix typo in idlelib/zzdummy.py #20093
  • 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 = 'https://github.com/terryjreedy'
    closed_at = <Date 2020-05-14.22:53:31.346>
    created_at = <Date 2020-04-30.23:48:17.516>
    labels = ['easy', 'expert-IDLE', '3.9']
    title = '[easy] undefined name in Lib/idlelib/zzdummy.py'
    updated_at = <Date 2020-05-14.22:53:31.345>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2020-05-14.22:53:31.345>
    actor = 'vstinner'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2020-05-14.22:53:31.346>
    closer = 'vstinner'
    components = ['IDLE']
    creation = <Date 2020-04-30.23:48:17.516>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40460
    keywords = ['patch', 'newcomer friendly']
    message_count = 4.0
    messages = ['367810', '367834', '368871', '368872']
    nosy_count = 2.0
    nosy_names = ['terry.reedy', 'vstinner']
    pr_nums = ['20093']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue40460'
    versions = ['Python 3.9']

    @vstinner
    Copy link
    Member Author

    pyflakes found the following issue:

    Lib/idlelib/zzdummy.py:31:33 undefined name 'ztest'

    Code:

    ztext = idleConf.GetOption('extensions', 'ZzDummy', 'z-text')
    (...)
            for line in range(1, text.index('end')):
                text.insert('%d.0', ztest)

    Maybe it's a typo: ztext instead of ztest? I'm not sure.

    @vstinner vstinner added the 3.9 only security fixes label Apr 30, 2020
    @vstinner vstinner added topic-IDLE easy 3.9 only security fixes labels Apr 30, 2020
    @terryjreedy
    Copy link
    Member

    Yes, simple typo. I need to look at test_Zzdummy.py to see if it should have been failing with the typo. If this is executed, the end index must be 1 so that the loop never executes.

    @vstinner
    Copy link
    Member Author

    New changeset edf2643 by Victor Stinner in branch 'master':
    bpo-40460: Fix typo in idlelib/zzdummy.py (GH-20093)
    edf2643

    @vstinner
    Copy link
    Member Author

    Yes, simple typo.

    Ok, thanks for the confirmation :-) It's now fixed.

    @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
    Labels
    3.9 only security fixes easy topic-IDLE
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants