robotcodedev / robotcode

RobotFramework support for Visual Studio Code
https://robotcode.io
Apache License 2.0
168 stars 13 forks source link

[ENHANCEMENT] better Literal support #211

Open WisniewskiP opened 5 months ago

WisniewskiP commented 5 months ago

Is your enhancement request related to a problem? Please describe. when keyword has Literal as argument I would like to have value suggestions when writing test. example: Library:

from typing import Literal

def keyword_with_literals(arg1: Literal["v1", "v2"]):
    pass

test:

*** Settings ***
Library    literals.py

*** Test Cases ***
Test
    Keyword With Literals  arg1=v1

current suggestions are random strings: grafik

Describe the solution you'd like the list should only contain values from literal

Additional context tested with:

> robot --version
Robot Framework 7.0 (Python 3.10.1 on win32)