kernelci / kernelci/kernelci-api

Add `__str` cast operator

Open
#250 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
10
Forks
21
PR merge metrics
No merged PRs in 30d

Description

In the same way that we have the `__int` operator to cast values passed in an API query to integers, we should have `__str` to cast values to strings (or not cast it to anything else). This is typically for cases where the value is only digits and would otherwise automatically be cast to an integer. It's likely to arise with the arbitrary data stored in `Node.data` where we can't infer the type of the fields on the API side.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the existing __int operator and its tests, then trace how API query values and arbitrary Node.data fields are parsed. Add the corresponding __str behavior so digit-only values can remain strings, and verify it with focused query and Node.data tests if those test locations exist.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
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.