cognitedata / cognitedata/cognite-sdk-python

Discrepancy between docstring and real implementation of SequencesDataAPI.retrieve_last_row

Open
#2,266 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
92
Forks
38
Avg merge
2d 9h
Merged PRs (30d)
42

Description

System information (please complete the following information):

  • OS: Windows
  • Python Version: 3.11.9
  • SDK Version: 7.73.3

Describe the bug
Docstring of SequencesDataAPI.retrieve_last_row for parameter external_id is "External id or list of external ids." but it doesn't handle list[str], only str | None as typed.
Documentation : https://cognite-sdk-python.readthedocs-hosted.com/en/latest/sequences.html#retrieve-last-row

Expected behavior
Accept list of str as DatapointsAPI.retrieve_latest accept this data type.

Screenshots

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the implementation and type annotation of SequencesDataAPI.retrieve_last_row, then compare its handling of external_id with DatapointsAPI.retrieve_latest. Done means retrieve_last_row accepts a list of strings as documented, while preserving existing string and None behavior, with coverage for the list input.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.