Giter Site home page Giter Site logo

rope's Issues

rope do not extract function from for else statemant

rope do not extract function from for else statemant

======================================================================
ERROR: test_extract_function_with_for_else_statemant (ropetest.refactor.extracttest.ExtractMethodTest)
TODO: fixed code to test passed
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../rope/ropetest/refactor/extracttest.py", line 962, in test_extract_function_with_for_else_statemant
    refactored = self.do_extract_method(code, start, end, 'new_func')
  File ".../rope/ropetest/refactor/extracttest.py", line 28, in do_extract_method
    self.project.do(extractor.get_changes(extracted, **kwds))
  File ".../rope/rope/refactor/extract.py", line 67, in get_changes
    new_contents = _ExtractPerformer(info).extract()
  File ".../rope/rope/refactor/extract.py", line 211, in __init__
    _ExceptionalConditionChecker()(self.info)
  File ".../rope/rope/refactor/extract.py", line 348, in __call__
    self.base_conditions(info)
  File ".../rope/rope/refactor/extract.py", line 365, in base_conditions
    if _UnmatchedBreakOrContinueFinder.has_errors(extracted):
  File ".../rope/rope/refactor/extract.py", line 783, in has_errors
    ast.walk(node, visitor)
  File ".../rope/rope/base/ast.py", line 41, in walk
    walk(child, walker)
  File ".../rope/rope/base/ast.py", line 39, in walk
    return method(node)
  File ".../rope/rope/refactor/extract.py", line 748, in _For
    self.loop_encountered(node)
  File ".../rope/rope/refactor/extract.py", line 759, in loop_encountered
    ast.walk(node.orelse, self)
  File ".../rope/rope/base/ast.py", line 40, in walk
    for child in get_child_nodes(node):
  File ".../rope/rope/base/ast.py", line 48, in get_child_nodes
    if node._fields is not None:
AttributeError: 'list' object has no attribute '_fields'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.