Skip to content

[minor] ReadTool ignores documented negative offset #22

@Scratchydisk

Description

@Scratchydisk

The offset parameter is documented as supporting negative values (read.py:24): "Negative values count backwards from the end (e.g. -1 is the last line)." But the implementation silently resets any negative offset to 1 (read.py:53-54):

if offset is None or offset < 0:
    offset = 1

So the documented count-from-end behaviour is unimplemented — offset=-1 reads from the start, not the last line.

Suggested fix: implement the from-end semantics, or remove the claim from the parameter description.

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