Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Syntax error in autocompletion crashes bpython #347

Closed
Milestone
@mlauter

Description

@mlauter

Using the latest bpython-curtsies

What I started with was this line:

re.sub(r'(^\w+Error|^error)',r"blue('\1')",list[-1])

Then I realized, wait, I'd like to set line[-1] equal to this expression I wrote out, so I ctrl-A ed back to the front, and started typing line[-1... in front of the expression I had written. Then bpython exploded:

list[-re.sub(r'(^\w+Error|^error)',r"blue('\1')",list[-1])Traceback (mostrecentcalllast):File"/Users/Miriam/.virtualenvs/bpython-dev/bin/bpython-curtsies",line9,in<module>load_entry_point('bpython==mercurial','console_scripts','bpython-curtsies')()File"/Users/Miriam/HSchool/bpython/bpython/curtsies.py",line66,inmainmainloop(config,locals_,banner,interp,paste,interactive=(notexec_args))File"/Users/Miriam/HSchool/bpython/bpython/curtsies.py",line132,inmainloopprocess_event(e)File"/Users/Miriam/HSchool/bpython/bpython/curtsies.py",line115,inprocess_eventrepl.process_event(e)File"/Users/Miriam/HSchool/bpython/bpython/curtsiesfrontend/repl.py",line532,inprocess_eventself.update_completion()File"/Users/Miriam/HSchool/bpython/bpython/curtsiesfrontend/repl.py",line643,inupdate_completionself.list_win_visible=BpythonRepl.complete(self,tab)File"/Users/Miriam/HSchool/bpython/bpython/repl.py",line633,incompleteself.config.complete_magic_methods)File"/Users/Miriam/HSchool/bpython/bpython/autocomplete.py",line84,inget_completermatches=AttrCompletion.matches(cursor_offset,current_line,**kwargs)File"/Users/Miriam/HSchool/bpython/bpython/autocomplete.py",line186,inmatchesattr_matches(methodtext,locals_,mode)]File"/Users/Miriam/HSchool/bpython/bpython/autocomplete.py",line362,inattr_matchesobj=safe_eval(expr,namespace)File"/Users/Miriam/HSchool/bpython/bpython/autocomplete.py",line343,insafe_evalobj=eval(expr,namespace)File"<string>",line11re^SyntaxError:unexpectedEOFwhileparsing

Just to be clear, I hadn't hit enter yet or anything, I was just in the process of typing.

All you really need to do to reproduce the error is have something likere.search() and then go back to the beginning of the line and type1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp