Question: Type-checking warnings + "errors" after a file edit #2378

Closed
opened 2026-02-16 17:35:23 -05:00 by yindo · 1 comment
Owner

Originally created by @Uranium2 on GitHub (Oct 31, 2025).

Originally assigned to: @rekram1-node on GitHub.

Question

Hello,

When opencode is editing some code, most of the time (or all the time) it's outputing the edited code AND some large prase/linting warning/typer warning.

Edit streamlit_app.py

 382   st.markdown("---")                                   382   st.markdown("---")
 383                                                        383
 384   # Action categories distribution                     384   # Action categories distribution
 385   st.subheader("Distribution des catégories d'act...   385   st.subheader("Distribution des catégories d'act...
 386 - action_categories = []
 387 - for v in filtered_verbatims:
 388 -     if v.get(KEY_ANALYSIS, {}).get(KEY_ACTIONAB...
 389 -         actions = v.get(KEY_ANALYSIS, {}).get(K...
 390 -         for action in actions:
 391 -             if isinstance(action, dict):
 392 -                 category = action.get(KEY_ACTIO...
 393 -                 if category:
 394 -                     action_categories.append(ca...   386 + action_categories = []
                                                            387 + for v in filtered_verbatims:
                                                            388 +     if v.get(KEY_ANALYSIS, {}).get(KEY_ACTIONAB...
                                                            389 +         actions = v.get(KEY_ANALYSIS, {}).get(K...
                                                            390 +         for action in actions:
                                                            391 +             if isinstance(action, dict):
                                                            392 +                 category = action.get("category")
                                                            393 +                 if category:
                                                            394 +                     action_categories.append(ca...
 395                                                        395
 396   if action_categories:                                396   if action_categories:
 397       category_counts = pd.Series(action_categori...   397       category_counts = pd.Series(action_categori...
 398                                                        398

Error [23:6] Import "openai_cost_calculator" could not be resolved

Error [24:6] Import "wordcloud" could not be resolved

Error [247:21] No overloads for "reset_index" match the provided arguments
  Argument types: (Literal['nombre'])

Error [258:58] "lower" is not a known attribute of "None"

Error [269:25] No overloads for "reset_index" match the provided arguments
  Argument types: (Literal['nombre actionnables'])

Error [276:20] No overloads for "reset_index" match the provided arguments
  Argument types: (Literal['nombre total'])

Error [294:66] "lower" is not a known attribute of "None"

Error [323:63] "lower" is not a known attribute of "None"

Error [337:29] No overloads for "reset_index" match the provided arguments
  Argument types: (Literal['nombre'])

Error [375:66] "lower" is not a known attribute of "None"

Error [464:28] No overloads for "reset_index" match the provided arguments
  Argument types: (Literal['nombre mentions'])

Error [475:76] "lower" is not a known attribute of "None"

Error [523:31] No overloads for "reset_index" match the provided arguments
  Argument types: (Literal['nombre mentions'])

Error [536:79] "lower" is not a known attribute of "None"

Error [571:67] "lower" is not a known attribute of "None"

Error [593:71] "lower" is not a known attribute of "None"

Error [606:27] No overloads for "reset_index" match the provided arguments
  Argument types: (Literal['nombre verbatims'])

Error [617:74] "lower" is not a known attribute of "None"

Error [1289:53] Argument of type "list[Unknown | str]" cannot be assigned to parameter "columns" of type "Axes |
None" in function "__init__"
  Type "list[Unknown | str]" is not assignable to type "Axes | None"
    "list[Unknown | str]" is not assignable to "ExtensionArray"
    "list[Unknown | str]" is not assignable to "ndarray[Unknown, Unknown]"
    "list[Unknown | str]" is not assignable to "Index"
    "list[Unknown | str]" is not assignable to "Series"
    "list[Unknown | str]" is incompatible with protocol "SequenceNotStr[Unknown]"
      "index" is an incompatible type
        Type "(value: Unknown | str, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int" is
not assignable to type "(value: Any, /, start: int = 0, stop: int = ...) -> int"
  ...

Error [1967:62] Cannot access attribute "dropna" for class "ndarray[Any, Unknown]"
  Attribute "dropna" is unknown

Error [1967:62] Cannot access attribute "dropna" for class "NDArray[Unknown]"
  Attribute "dropna" is unknown

Error [1977:56] Cannot access attribute "dropna" for class "ndarray[Any, Unknown]"
  Attribute "dropna" is unknown

Error [1977:56] Cannot access attribute "dropna" for class "NDArray[Unknown]"
  Attribute "dropna" is unknown

Error [2008:15] Argument of type "tuple[Unknown | Any | Series, Unknown | Any | Series]" cannot be assigned to
parameter "value" of type "DateValue | Literal['today']" in function "date_input"
  Type "tuple[Unknown | Any | Series, Unknown | Any | Series]" is not assignable to type "DateValue |
Literal['today']"
    "tuple[Unknown | Any | Series, Unknown | Any | Series]" is not assignable to "date"
    "tuple[Unknown | Any | Series, Unknown | Any | Series]" is not assignable to "datetime"
    "tuple[Unknown | Any | Series, Unknown | Any | Series]" is not assignable to "None"
    "tuple[Unknown | Any | Series, Unknown | Any | Series]" is not assignable to "Sequence[SingleDateValue]"
      Type parameter "_T_co@Sequence" is covariant, but "Unknown | Any | Series" is not a subtype of
"SingleDateValue"
        Type "Unknown | Any | Series" is not assignable to type "SingleDateValue"
          Type "Series" is not assignable to type "SingleDateValue"
  ...

Error [2009:19] Argument of type "Unknown | Any | Series" cannot be assigned to parameter "min_value" of type
"SingleDateValue" in function "date_input"
  Type "Unknown | Any | Series" is not assignable to type "SingleDateValue"
    Type "Series" is not assignable to type "SingleDateValue"
      "Series" is not assignable to "date"
      "Series" is not assignable to "datetime"
      "Series" is not assignable to "None"

Error [2010:19] Argument of type "Unknown | Any | Series" cannot be assigned to parameter "max_value" of type
"SingleDateValue" in function "date_input"
  Type "Unknown | Any | Series" is not assignable to type "SingleDateValue"
    Type "Series" is not assignable to type "SingleDateValue"
      "Series" is not assignable to "date"
      "Series" is not assignable to "datetime"
      "Series" is not assignable to "None"

Error [2056:58] Cannot access attribute "isin" for class "ndarray[Any, Unknown]"
  Attribute "isin" is unknown

Error [2056:58] Cannot access attribute "isin" for class "NDArray[Unknown]"
  Attribute "isin" is unknown

Error [2059:53] Cannot access attribute "isin" for class "ndarray[Any, Unknown]"
  Attribute "isin" is unknown

Error [2059:53] Cannot access attribute "isin" for class "NDArray[Unknown]"
  Attribute "isin" is unknown

Error [2059:53] Cannot access attribute "isin" for class "NDArray[Any]"
  Attribute "isin" is unknown

Error [2018:66] Index 0 is out of range for type Tuple[()]

Error [2205:71] Argument of type "Number" cannot be assigned to parameter "n" of type "int | None" in function
"most_common"
  Type "Number" is not assignable to type "int | None"
    Type "float" is not assignable to type "int | None"
      "float" is not assignable to "int"
      "float" is not assignable to "None"

Error [2207:43] Argument of type "list[str]" cannot be assigned to parameter "columns" of type "Axes | None" in
function "__init__"
  Type "list[str]" is not assignable to type "Axes | None"
    "list[str]" is not assignable to "ExtensionArray"
    "list[str]" is not assignable to "ndarray[Unknown, Unknown]"
    "list[str]" is not assignable to "Index"
    "list[str]" is not assignable to "Series"
    "list[str]" is incompatible with protocol "SequenceNotStr[Unknown]"
      "index" is an incompatible type
        Type "(value: str, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int" is not
assignable to type "(value: Any, /, start: int = 0, stop: int = ...) -> int"
  ...

Error [2232:77] Argument of type "Number" cannot be assigned to parameter "n" of type "int | None" in function
"most_common"
  Type "Number" is not assignable to type "int | None"
    Type "float" is not assignable to type "int | None"
      "float" is not assignable to "int"
      "float" is not assignable to "None"

Error [2234:46] Argument of type "list[str]" cannot be assigned to parameter "columns" of type "Axes | None" in
function "__init__"
  Type "list[str]" is not assignable to type "Axes | None"
    "list[str]" is not assignable to "ExtensionArray"
    "list[str]" is not assignable to "ndarray[Unknown, Unknown]"
    "list[str]" is not assignable to "Index"
    "list[str]" is not assignable to "Series"
    "list[str]" is incompatible with protocol "SequenceNotStr[Unknown]"
      "index" is an incompatible type
        Type "(value: str, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int" is not
assignable to type "(value: Any, /, start: int = 0, stop: int = ...) -> int"
  ...

Error [2296:23] Argument of type "Literal['stretch']" cannot be assigned to parameter "width" of type "int | Non
e"
in function "dataframe"

  Type "Literal['stretch']" is not assignable to type "int | None"

    "Literal['stretch']" is not assignable to "int"

    "Literal['stretch']" is not assignable to "None"


Error [2347:63] Argument of type "Number" cannot be assigned to parameter "n" of type "int | None" in function
"most_common"
  Type "Number" is not assignable to type "int | None"
    Type "float" is not assignable to type "int | None"
      "float" is not assignable to "int"
      "float" is not assignable to "None"

Error [2349:43] Argument of type "list[str]" cannot be assigned to parameter "columns" of type "Axes | None" in
function "__init__"
  Type "list[str]" is not assignable to type "Axes | None"
    "list[str]" is not assignable to "ExtensionArray"
    "list[str]" is not assignable to "ndarray[Unknown, Unknown]"
    "list[str]" is not assignable to "Index"
    "list[str]" is not assignable to "Series"
    "list[str]" is incompatible with protocol "SequenceNotStr[Unknown]"
      "index" is an incompatible type
        Type "(value: str, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int" is not
assignable to type "(value: Any, /, start: int = 0, stop: int = ...) -> int"
  ...

Error [2370:23] Argument of type "Literal['stretch']" cannot be assigned to parameter "width" of type "int | Non
e"
in function "dataframe"

  Type "Literal['stretch']" is not assignable to type "int | None"

    "Literal['stretch']" is not assignable to "int"

    "Literal['stretch']" is not assignable to "None"


Error [2412:43] Cannot access attribute "sort_values" for class "NDArray[Unknown]"
  Attribute "sort_values" is unknown

Error [2412:43] Cannot access attribute "sort_values" for class "ndarray[Any, Unknown]"
  Attribute "sort_values" is unknown

Error [2412:29] No overloads for "sort_values" match the provided arguments
  Argument types: (Literal['sentiment_score'])

Error [2414:43] Cannot access attribute "sort_values" for class "NDArray[Unknown]"
  Attribute "sort_values" is unknown

Error [2414:43] Cannot access attribute "sort_values" for class "ndarray[Any, Unknown]"
  Attribute "sort_values" is unknown

Error [2414:29] No overloads for "sort_values" match the provided arguments
  Argument types: (Literal['action_items_count'], Literal[False])

Error [2418:43] Cannot access attribute "sort_values" for class "NDArray[Unknown]"
  Attribute "sort_values" is unknown

Error [2418:43] Cannot access attribute "sort_values" for class "ndarray[Any, Unknown]"
  Attribute "sort_values" is unknown

Error [2418:29] No overloads for "sort_values" match the provided arguments
  Argument types: (Literal['improvements_count'], Literal[False])

Error [2422:44] Argument of type "Number" cannot be assigned to parameter "n" of type "int" in function "head"
  Type "Number" is not assignable to type "int"
    "float" is not assignable to "int"

Error [2434:86] Cannot access attribute "upper" for class "ndarray[Any, Unknown]"
  Attribute "upper" is unknown

Error [2434:86] Cannot access attribute "upper" for class "NDArray[Unknown]"
  Attribute "upper" is unknown

Error [2459:59] Cannot access attribute "value_counts" for class "ndarray[Any, Unknown]"
  Attribute "value_counts" is unknown

Error [2459:59] Cannot access attribute "value_counts" for class "NDArray[Unknown]"
  Attribute "value_counts" is unknown

Error [2459:59] Cannot access attribute "value_counts" for class "NDArray[Any]"
  Attribute "value_counts" is unknown

Error [2474:47] Cannot access attribute "value_counts" for class "ndarray[Any, Unknown]"
  Attribute "value_counts" is unknown

Error [2474:47] Cannot access attribute "value_counts" for class "NDArray[Unknown]"
  Attribute "value_counts" is unknown

Error [2474:47] Cannot access attribute "value_counts" for class "NDArray[Any]"
  Attribute "value_counts" is unknown

Error [2493:51] Cannot access attribute "dropna" for class "ndarray[Any, Unknown]"
  Attribute "dropna" is unknown

Error [2493:51] Cannot access attribute "dropna" for class "NDArray[Unknown]"
  Attribute "dropna" is unknown

Error [2493:51] Cannot access attribute "dropna" for class "NDArray[Any]"
  Attribute "dropna" is unknown

Error [2498:72] Argument of type "Number" cannot be assigned to parameter "n" of type "int" in function "head"
  Type "Number" is not assignable to type "int"
    "float" is not assignable to "int"

Error [2517:57] Cannot access attribute "dropna" for class "ndarray[Any, Unknown]"
  Attribute "dropna" is unknown

Error [2517:57] Cannot access attribute "dropna" for class "NDArray[Unknown]"
  Attribute "dropna" is unknown

Error [2517:57] Cannot access attribute "dropna" for class "NDArray[Any]"
  Attribute "dropna" is unknown

Error [2523:63] Argument of type "Number" cannot be assigned to parameter "n" of type "int" in function "head"
  Type "Number" is not assignable to type "int"
    "float" is not assignable to "int"

Error [2696:50] Argument of type "list[str]" cannot be assigned to parameter "columns" of type "Axes | None" in
function "__init__"
  Type "list[str]" is not assignable to type "Axes | None"
    "list[str]" is not assignable to "ExtensionArray"
    "list[str]" is not assignable to "ndarray[Unknown, Unknown]"
    "list[str]" is not assignable to "Index"
    "list[str]" is not assignable to "Series"
    "list[str]" is incompatible with protocol "SequenceNotStr[Unknown]"
      "index" is an incompatible type
        Type "(value: str, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int" is not
assignable to type "(value: Any, /, start: int = 0, stop: int = ...) -> int"
  ...

Error [2738:12] Argument of type "Iterator[Unknown]" cannot be assigned to parameter "obj" of type "Sized" in
function "len"
  "Iterator[Unknown]" is incompatible with protocol "Sized"
    "__len__" is not present

Error [2804:64] Argument of type "Number" cannot be assigned to parameter "top_n" of type "int" in function
"calculate_item_pairs"
  Type "Number" is not assignable to type "int"
    "float" is not assignable to "int"

Error [2807:41] Argument of type "Literal['stretch']" cannot be assigned to parameter "width" of type "int | Non
e"
in function "dataframe"

  Type "Literal['stretch']" is not assignable to type "int | None"

    "Literal['stretch']" is not assignable to "int"

    "Literal['stretch']" is not assignable to "None"


Error [2866:12] Argument of type "Iterator[Unknown]" cannot be assigned to parameter "obj" of type "Sized" in
function "len"
  "Iterator[Unknown]" is incompatible with protocol "Sized"
    "__len__" is not present

Error [2905:69] Argument of type "Number" cannot be assigned to parameter "top_n" of type "int" in function
"calculate_item_pairs"
  Type "Number" is not assignable to type "int"
    "float" is not assignable to "int"

Error [2908:41] Argument of type "Literal['stretch']" cannot be assigned to parameter "width" of type "int | Non
e"
in function "dataframe"

  Type "Literal['stretch']" is not assignable to type "int | None"

    "Literal['stretch']" is not assignable to "int"

    "Literal['stretch']" is not assignable to "None"


Error [2930:65] Argument of type "Number" cannot be assigned to parameter "n" of type "int | None" in function
"most_common"
  Type "Number" is not assignable to type "int | None"
    Type "float" is not assignable to type "int | None"
      "float" is not assignable to "int"
      "float" is not assignable to "None"

Error [2931:53] Argument of type "list[str]" cannot be assigned to parameter "columns" of type "Axes | None" in
function "__init__"
  Type "list[str]" is not assignable to type "Axes | None"
    "list[str]" is not assignable to "ExtensionArray"
    "list[str]" is not assignable to "ndarray[Unknown, Unknown]"
    "list[str]" is not assignable to "Index"
    "list[str]" is not assignable to "Series"
    "list[str]" is incompatible with protocol "SequenceNotStr[Unknown]"
      "index" is an incompatible type
        Type "(value: str, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int" is not
assignable to type "(value: Any, /, start: int = 0, stop: int = ...) -> int"
  ...

Error [2946:37] Argument of type "Literal['stretch']" cannot be assigned to parameter "width" of type "int | Non
e"
in function "dataframe"

  Type "Literal['stretch']" is not assignable to type "int | None"

    "Literal['stretch']" is not assignable to "int"

    "Literal['stretch']" is not assignable to "None"


Error [3026:41] Cannot access attribute "str" for class "ndarray[Any, Unknown]"
  Attribute "str" is unknown

Error [3026:41] Cannot access attribute "str" for class "NDArray[Unknown]"
  Attribute "str" is unknown

Error [3026:41] Cannot access attribute "str" for class "NDArray[Any]"
  Attribute "str" is unknown

Error [3028:33] Cannot access attribute "str" for class "ndarray[Any, Unknown]"
  Attribute "str" is unknown

Error [3028:33] Cannot access attribute "str" for class "NDArray[Unknown]"
  Attribute "str" is unknown

Error [3028:33] Cannot access attribute "str" for class "NDArray[Any]"
  Attribute "str" is unknown

Error [3056:29] Cannot access attribute "sort_values" for class "ndarray[Any, Unknown]"
  Attribute "sort_values" is unknown

Error [3056:29] Cannot access attribute "sort_values" for class "NDArray[Unknown]"
  Attribute "sort_values" is unknown

Error [3056:18] No overloads for "sort_values" match the provided arguments
  Argument types: (str | None, bool)

Error [3058:37] Argument of type "Number" cannot be assigned to parameter "n" of type "int" in function "head"
  Type "Number" is not assignable to type "int"
    "float" is not assignable to "int"

Error [3131:30] Argument of type "str | None" cannot be assigned to parameter "key" of type "str" in function
"__getitem__"
  Type "str | None" is not assignable to type "str"
    "None" is not assignable to "str"

Error [3297:35] No overloads for "reset_index" match the provided arguments
  Argument types: (Literal['nombre'])

Error [3338:32] No overloads for "reset_index" match the provided arguments
  Argument types: (Literal['nombre'])

Error [3587:29] "sorted_df" is possibly unbound

Error [3595:60] Cannot access attribute "upper" for class "ndarray[Any, Unknown]"
  Attribute "upper" is unknown

Error [3595:60] Cannot access attribute "upper" for class "NDArray[Unknown]"
  Attribute "upper" is unknown

These are type-checking warnings, not actual errors. Let me verify the edit was applied:
Build claude-sonnet-4.5 (12:06 PM)
Image Image

Is there a way to remove this? Sounds like it's using some tokens to understand what it is doing. The project is in python, I use Opencode in WSL2. I keep VSCode opened on the side to check the edited code and to modified it sometimes.

Originally created by @Uranium2 on GitHub (Oct 31, 2025). Originally assigned to: @rekram1-node on GitHub. ### Question Hello, When opencode is editing some code, most of the time (or all the time) it's outputing the edited code AND some large prase/linting warning/typer warning. ``` Edit streamlit_app.py 382 st.markdown("---") 382 st.markdown("---") 383 383 384 # Action categories distribution 384 # Action categories distribution 385 st.subheader("Distribution des catégories d'act... 385 st.subheader("Distribution des catégories d'act... 386 - action_categories = [] 387 - for v in filtered_verbatims: 388 - if v.get(KEY_ANALYSIS, {}).get(KEY_ACTIONAB... 389 - actions = v.get(KEY_ANALYSIS, {}).get(K... 390 - for action in actions: 391 - if isinstance(action, dict): 392 - category = action.get(KEY_ACTIO... 393 - if category: 394 - action_categories.append(ca... 386 + action_categories = [] 387 + for v in filtered_verbatims: 388 + if v.get(KEY_ANALYSIS, {}).get(KEY_ACTIONAB... 389 + actions = v.get(KEY_ANALYSIS, {}).get(K... 390 + for action in actions: 391 + if isinstance(action, dict): 392 + category = action.get("category") 393 + if category: 394 + action_categories.append(ca... 395 395 396 if action_categories: 396 if action_categories: 397 category_counts = pd.Series(action_categori... 397 category_counts = pd.Series(action_categori... 398 398 Error [23:6] Import "openai_cost_calculator" could not be resolved Error [24:6] Import "wordcloud" could not be resolved Error [247:21] No overloads for "reset_index" match the provided arguments   Argument types: (Literal['nombre']) Error [258:58] "lower" is not a known attribute of "None" Error [269:25] No overloads for "reset_index" match the provided arguments   Argument types: (Literal['nombre actionnables']) Error [276:20] No overloads for "reset_index" match the provided arguments   Argument types: (Literal['nombre total']) Error [294:66] "lower" is not a known attribute of "None" Error [323:63] "lower" is not a known attribute of "None" Error [337:29] No overloads for "reset_index" match the provided arguments   Argument types: (Literal['nombre']) Error [375:66] "lower" is not a known attribute of "None" Error [464:28] No overloads for "reset_index" match the provided arguments   Argument types: (Literal['nombre mentions']) Error [475:76] "lower" is not a known attribute of "None" Error [523:31] No overloads for "reset_index" match the provided arguments   Argument types: (Literal['nombre mentions']) Error [536:79] "lower" is not a known attribute of "None" Error [571:67] "lower" is not a known attribute of "None" Error [593:71] "lower" is not a known attribute of "None" Error [606:27] No overloads for "reset_index" match the provided arguments   Argument types: (Literal['nombre verbatims']) Error [617:74] "lower" is not a known attribute of "None" Error [1289:53] Argument of type "list[Unknown | str]" cannot be assigned to parameter "columns" of type "Axes | None" in function "__init__"   Type "list[Unknown | str]" is not assignable to type "Axes | None"     "list[Unknown | str]" is not assignable to "ExtensionArray"     "list[Unknown | str]" is not assignable to "ndarray[Unknown, Unknown]"     "list[Unknown | str]" is not assignable to "Index"     "list[Unknown | str]" is not assignable to "Series"     "list[Unknown | str]" is incompatible with protocol "SequenceNotStr[Unknown]"       "index" is an incompatible type         Type "(value: Unknown | str, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int" is not assignable to type "(value: Any, /, start: int = 0, stop: int = ...) -> int" ... Error [1967:62] Cannot access attribute "dropna" for class "ndarray[Any, Unknown]"   Attribute "dropna" is unknown Error [1967:62] Cannot access attribute "dropna" for class "NDArray[Unknown]"   Attribute "dropna" is unknown Error [1977:56] Cannot access attribute "dropna" for class "ndarray[Any, Unknown]"   Attribute "dropna" is unknown Error [1977:56] Cannot access attribute "dropna" for class "NDArray[Unknown]"   Attribute "dropna" is unknown Error [2008:15] Argument of type "tuple[Unknown | Any | Series, Unknown | Any | Series]" cannot be assigned to parameter "value" of type "DateValue | Literal['today']" in function "date_input"   Type "tuple[Unknown | Any | Series, Unknown | Any | Series]" is not assignable to type "DateValue | Literal['today']"     "tuple[Unknown | Any | Series, Unknown | Any | Series]" is not assignable to "date"     "tuple[Unknown | Any | Series, Unknown | Any | Series]" is not assignable to "datetime"     "tuple[Unknown | Any | Series, Unknown | Any | Series]" is not assignable to "None"     "tuple[Unknown | Any | Series, Unknown | Any | Series]" is not assignable to "Sequence[SingleDateValue]"       Type parameter "_T_co@Sequence" is covariant, but "Unknown | Any | Series" is not a subtype of "SingleDateValue"         Type "Unknown | Any | Series" is not assignable to type "SingleDateValue"           Type "Series" is not assignable to type "SingleDateValue" ... Error [2009:19] Argument of type "Unknown | Any | Series" cannot be assigned to parameter "min_value" of type "SingleDateValue" in function "date_input"   Type "Unknown | Any | Series" is not assignable to type "SingleDateValue"     Type "Series" is not assignable to type "SingleDateValue"       "Series" is not assignable to "date"       "Series" is not assignable to "datetime"       "Series" is not assignable to "None" Error [2010:19] Argument of type "Unknown | Any | Series" cannot be assigned to parameter "max_value" of type "SingleDateValue" in function "date_input"   Type "Unknown | Any | Series" is not assignable to type "SingleDateValue"     Type "Series" is not assignable to type "SingleDateValue"       "Series" is not assignable to "date"       "Series" is not assignable to "datetime"       "Series" is not assignable to "None" Error [2056:58] Cannot access attribute "isin" for class "ndarray[Any, Unknown]"   Attribute "isin" is unknown Error [2056:58] Cannot access attribute "isin" for class "NDArray[Unknown]"   Attribute "isin" is unknown Error [2059:53] Cannot access attribute "isin" for class "ndarray[Any, Unknown]"   Attribute "isin" is unknown Error [2059:53] Cannot access attribute "isin" for class "NDArray[Unknown]"   Attribute "isin" is unknown Error [2059:53] Cannot access attribute "isin" for class "NDArray[Any]"   Attribute "isin" is unknown Error [2018:66] Index 0 is out of range for type Tuple[()] Error [2205:71] Argument of type "Number" cannot be assigned to parameter "n" of type "int | None" in function "most_common"   Type "Number" is not assignable to type "int | None"     Type "float" is not assignable to type "int | None"       "float" is not assignable to "int"       "float" is not assignable to "None" Error [2207:43] Argument of type "list[str]" cannot be assigned to parameter "columns" of type "Axes | None" in function "__init__"   Type "list[str]" is not assignable to type "Axes | None"     "list[str]" is not assignable to "ExtensionArray"     "list[str]" is not assignable to "ndarray[Unknown, Unknown]"     "list[str]" is not assignable to "Index"     "list[str]" is not assignable to "Series"     "list[str]" is incompatible with protocol "SequenceNotStr[Unknown]"       "index" is an incompatible type         Type "(value: str, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int" is not assignable to type "(value: Any, /, start: int = 0, stop: int = ...) -> int" ... Error [2232:77] Argument of type "Number" cannot be assigned to parameter "n" of type "int | None" in function "most_common"   Type "Number" is not assignable to type "int | None"     Type "float" is not assignable to type "int | None"       "float" is not assignable to "int"       "float" is not assignable to "None" Error [2234:46] Argument of type "list[str]" cannot be assigned to parameter "columns" of type "Axes | None" in function "__init__"   Type "list[str]" is not assignable to type "Axes | None"     "list[str]" is not assignable to "ExtensionArray"     "list[str]" is not assignable to "ndarray[Unknown, Unknown]"     "list[str]" is not assignable to "Index"     "list[str]" is not assignable to "Series"     "list[str]" is incompatible with protocol "SequenceNotStr[Unknown]"       "index" is an incompatible type         Type "(value: str, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int" is not assignable to type "(value: Any, /, start: int = 0, stop: int = ...) -> int" ... Error [2296:23] Argument of type "Literal['stretch']" cannot be assigned to parameter "width" of type "int | Non e" in function "dataframe"   Type "Literal['stretch']" is not assignable to type "int | None"     "Literal['stretch']" is not assignable to "int"     "Literal['stretch']" is not assignable to "None" Error [2347:63] Argument of type "Number" cannot be assigned to parameter "n" of type "int | None" in function "most_common"   Type "Number" is not assignable to type "int | None"     Type "float" is not assignable to type "int | None"       "float" is not assignable to "int"       "float" is not assignable to "None" Error [2349:43] Argument of type "list[str]" cannot be assigned to parameter "columns" of type "Axes | None" in function "__init__"   Type "list[str]" is not assignable to type "Axes | None"     "list[str]" is not assignable to "ExtensionArray"     "list[str]" is not assignable to "ndarray[Unknown, Unknown]"     "list[str]" is not assignable to "Index"     "list[str]" is not assignable to "Series"     "list[str]" is incompatible with protocol "SequenceNotStr[Unknown]"       "index" is an incompatible type         Type "(value: str, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int" is not assignable to type "(value: Any, /, start: int = 0, stop: int = ...) -> int" ... Error [2370:23] Argument of type "Literal['stretch']" cannot be assigned to parameter "width" of type "int | Non e" in function "dataframe"   Type "Literal['stretch']" is not assignable to type "int | None"     "Literal['stretch']" is not assignable to "int"     "Literal['stretch']" is not assignable to "None" Error [2412:43] Cannot access attribute "sort_values" for class "NDArray[Unknown]"   Attribute "sort_values" is unknown Error [2412:43] Cannot access attribute "sort_values" for class "ndarray[Any, Unknown]"   Attribute "sort_values" is unknown Error [2412:29] No overloads for "sort_values" match the provided arguments   Argument types: (Literal['sentiment_score']) Error [2414:43] Cannot access attribute "sort_values" for class "NDArray[Unknown]"   Attribute "sort_values" is unknown Error [2414:43] Cannot access attribute "sort_values" for class "ndarray[Any, Unknown]"   Attribute "sort_values" is unknown Error [2414:29] No overloads for "sort_values" match the provided arguments   Argument types: (Literal['action_items_count'], Literal[False]) Error [2418:43] Cannot access attribute "sort_values" for class "NDArray[Unknown]"   Attribute "sort_values" is unknown Error [2418:43] Cannot access attribute "sort_values" for class "ndarray[Any, Unknown]"   Attribute "sort_values" is unknown Error [2418:29] No overloads for "sort_values" match the provided arguments   Argument types: (Literal['improvements_count'], Literal[False]) Error [2422:44] Argument of type "Number" cannot be assigned to parameter "n" of type "int" in function "head"   Type "Number" is not assignable to type "int"     "float" is not assignable to "int" Error [2434:86] Cannot access attribute "upper" for class "ndarray[Any, Unknown]"   Attribute "upper" is unknown Error [2434:86] Cannot access attribute "upper" for class "NDArray[Unknown]"   Attribute "upper" is unknown Error [2459:59] Cannot access attribute "value_counts" for class "ndarray[Any, Unknown]"   Attribute "value_counts" is unknown Error [2459:59] Cannot access attribute "value_counts" for class "NDArray[Unknown]"   Attribute "value_counts" is unknown Error [2459:59] Cannot access attribute "value_counts" for class "NDArray[Any]"   Attribute "value_counts" is unknown Error [2474:47] Cannot access attribute "value_counts" for class "ndarray[Any, Unknown]"   Attribute "value_counts" is unknown Error [2474:47] Cannot access attribute "value_counts" for class "NDArray[Unknown]"   Attribute "value_counts" is unknown Error [2474:47] Cannot access attribute "value_counts" for class "NDArray[Any]"   Attribute "value_counts" is unknown Error [2493:51] Cannot access attribute "dropna" for class "ndarray[Any, Unknown]"   Attribute "dropna" is unknown Error [2493:51] Cannot access attribute "dropna" for class "NDArray[Unknown]"   Attribute "dropna" is unknown Error [2493:51] Cannot access attribute "dropna" for class "NDArray[Any]"   Attribute "dropna" is unknown Error [2498:72] Argument of type "Number" cannot be assigned to parameter "n" of type "int" in function "head"   Type "Number" is not assignable to type "int"     "float" is not assignable to "int" Error [2517:57] Cannot access attribute "dropna" for class "ndarray[Any, Unknown]"   Attribute "dropna" is unknown Error [2517:57] Cannot access attribute "dropna" for class "NDArray[Unknown]"   Attribute "dropna" is unknown Error [2517:57] Cannot access attribute "dropna" for class "NDArray[Any]"   Attribute "dropna" is unknown Error [2523:63] Argument of type "Number" cannot be assigned to parameter "n" of type "int" in function "head"   Type "Number" is not assignable to type "int"     "float" is not assignable to "int" Error [2696:50] Argument of type "list[str]" cannot be assigned to parameter "columns" of type "Axes | None" in function "__init__"   Type "list[str]" is not assignable to type "Axes | None"     "list[str]" is not assignable to "ExtensionArray"     "list[str]" is not assignable to "ndarray[Unknown, Unknown]"     "list[str]" is not assignable to "Index"     "list[str]" is not assignable to "Series"     "list[str]" is incompatible with protocol "SequenceNotStr[Unknown]"       "index" is an incompatible type         Type "(value: str, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int" is not assignable to type "(value: Any, /, start: int = 0, stop: int = ...) -> int" ... Error [2738:12] Argument of type "Iterator[Unknown]" cannot be assigned to parameter "obj" of type "Sized" in function "len"   "Iterator[Unknown]" is incompatible with protocol "Sized"     "__len__" is not present Error [2804:64] Argument of type "Number" cannot be assigned to parameter "top_n" of type "int" in function "calculate_item_pairs"   Type "Number" is not assignable to type "int"     "float" is not assignable to "int" Error [2807:41] Argument of type "Literal['stretch']" cannot be assigned to parameter "width" of type "int | Non e" in function "dataframe"   Type "Literal['stretch']" is not assignable to type "int | None"     "Literal['stretch']" is not assignable to "int"     "Literal['stretch']" is not assignable to "None" Error [2866:12] Argument of type "Iterator[Unknown]" cannot be assigned to parameter "obj" of type "Sized" in function "len"   "Iterator[Unknown]" is incompatible with protocol "Sized"     "__len__" is not present Error [2905:69] Argument of type "Number" cannot be assigned to parameter "top_n" of type "int" in function "calculate_item_pairs"   Type "Number" is not assignable to type "int"     "float" is not assignable to "int" Error [2908:41] Argument of type "Literal['stretch']" cannot be assigned to parameter "width" of type "int | Non e" in function "dataframe"   Type "Literal['stretch']" is not assignable to type "int | None"     "Literal['stretch']" is not assignable to "int"     "Literal['stretch']" is not assignable to "None" Error [2930:65] Argument of type "Number" cannot be assigned to parameter "n" of type "int | None" in function "most_common"   Type "Number" is not assignable to type "int | None"     Type "float" is not assignable to type "int | None"       "float" is not assignable to "int"       "float" is not assignable to "None" Error [2931:53] Argument of type "list[str]" cannot be assigned to parameter "columns" of type "Axes | None" in function "__init__"   Type "list[str]" is not assignable to type "Axes | None"     "list[str]" is not assignable to "ExtensionArray"     "list[str]" is not assignable to "ndarray[Unknown, Unknown]"     "list[str]" is not assignable to "Index"     "list[str]" is not assignable to "Series"     "list[str]" is incompatible with protocol "SequenceNotStr[Unknown]"       "index" is an incompatible type         Type "(value: str, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int" is not assignable to type "(value: Any, /, start: int = 0, stop: int = ...) -> int" ... Error [2946:37] Argument of type "Literal['stretch']" cannot be assigned to parameter "width" of type "int | Non e" in function "dataframe"   Type "Literal['stretch']" is not assignable to type "int | None"     "Literal['stretch']" is not assignable to "int"     "Literal['stretch']" is not assignable to "None" Error [3026:41] Cannot access attribute "str" for class "ndarray[Any, Unknown]"   Attribute "str" is unknown Error [3026:41] Cannot access attribute "str" for class "NDArray[Unknown]"   Attribute "str" is unknown Error [3026:41] Cannot access attribute "str" for class "NDArray[Any]"   Attribute "str" is unknown Error [3028:33] Cannot access attribute "str" for class "ndarray[Any, Unknown]"   Attribute "str" is unknown Error [3028:33] Cannot access attribute "str" for class "NDArray[Unknown]"   Attribute "str" is unknown Error [3028:33] Cannot access attribute "str" for class "NDArray[Any]"   Attribute "str" is unknown Error [3056:29] Cannot access attribute "sort_values" for class "ndarray[Any, Unknown]"   Attribute "sort_values" is unknown Error [3056:29] Cannot access attribute "sort_values" for class "NDArray[Unknown]"   Attribute "sort_values" is unknown Error [3056:18] No overloads for "sort_values" match the provided arguments   Argument types: (str | None, bool) Error [3058:37] Argument of type "Number" cannot be assigned to parameter "n" of type "int" in function "head"   Type "Number" is not assignable to type "int"     "float" is not assignable to "int" Error [3131:30] Argument of type "str | None" cannot be assigned to parameter "key" of type "str" in function "__getitem__"   Type "str | None" is not assignable to type "str"     "None" is not assignable to "str" Error [3297:35] No overloads for "reset_index" match the provided arguments   Argument types: (Literal['nombre']) Error [3338:32] No overloads for "reset_index" match the provided arguments   Argument types: (Literal['nombre']) Error [3587:29] "sorted_df" is possibly unbound Error [3595:60] Cannot access attribute "upper" for class "ndarray[Any, Unknown]"   Attribute "upper" is unknown Error [3595:60] Cannot access attribute "upper" for class "NDArray[Unknown]"   Attribute "upper" is unknown These are type-checking warnings, not actual errors. Let me verify the edit was applied: Build claude-sonnet-4.5 (12:06 PM) ```` <img width="1202" height="1029" alt="Image" src="https://github.com/user-attachments/assets/6c2a1043-ddc3-4a10-ba91-d9b695371b6f" /> <img width="1186" height="914" alt="Image" src="https://github.com/user-attachments/assets/23dee085-6730-44bd-9d8d-5a104e274335" /> Is there a way to remove this? Sounds like it's using some tokens to understand what it is doing. The project is in python, I use Opencode in WSL2. I keep VSCode opened on the side to check the edited code and to modified it sometimes.
yindo closed this issue 2026-02-16 17:35:23 -05:00
Author
Owner

@rekram1-node commented on GitHub (Oct 31, 2025):

Yeah this is lsp feedback, you can disable the lsp in your opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "lsp": {
    "pyright": {
      "disabled": true
    }
  }
}
@rekram1-node commented on GitHub (Oct 31, 2025): Yeah this is lsp feedback, you can disable the lsp in your opencode.json: ``` { "$schema": "https://opencode.ai/config.json", "lsp": { "pyright": { "disabled": true } } } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2378