Skip to content

Unreachable code in python_completer.py #1672

@StDymphna

Description

@StDymphna

The last commit to ycmd/completers/python/python_completer.py ( 9e6b32b ) introduced several warnings and caused LOGGER.error to become unreachable/dead code.

E1120 No value for argument 'start' in constructor call, 621:9
E1120 No value for argument 'end' in constructor call, 621:9

responses.Range( *_OffsetToPosition( ( old_start, old_end ),
filename,
old_text,
newlines ) )
) )

PLW0101 Unreachable code, 656:3
if len( loc ) == 2:
break
return loc
# Invalid position - it's outside of the text. Just return the last
# position in the text. This is an internal error.
LOGGER.error( "Invalid offset %s in file %s with text %s and newlines %s",
offset,
filename,
text,
newlines )
raise RuntimeError( "Invalid file offset in diff" )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions