cognitedata / cognitedata/cognite-sdk-python

`CogniteResourceList` lacks correct dunder method implementations

Open
#1,188 0 comments 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

It inherits from collections.UserList, but with its added features, e.g. get lookup accepting id or external_id, almost all mutating (magic or not) methods breaks some functionality.

https://github.com/python/cpython/blob/abd6e97020e5773ce2136228e31930a6d9e82dc0/Lib/collections/__init__.py#L1196

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 comparing CogniteResourceList with the linked collections.UserList implementation, focusing on the mutating dunder methods and the added get lookup accepting id or external_id. Done means those methods preserve the resource-list functionality instead of breaking it; the issue does not name project files or tests to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.