Skip to content

reportArgumentType error during type checking when using non-default polling_mode #77

Closed

Description

@AndreyKuchko

Describe the bug

It looks like there are typing issue when I use polling_mode that is different from default AutoPollingMode

To reproduce

  1. Prepare a simple script that creates client with non-defaut polling_mode(save it to file with name configcat_issue.py)
import configcatclient
from configcatclient.configcatoptions import ConfigCatOptions
from configcatclient.pollingmode import PollingMode

client = configcatclient.get(
    "my-key",
    ConfigCatOptions(polling_mode=PollingMode.lazy_load()),
)

client.close()
  1. Run type checker(for example pyright)
pyright configcat_issue.py
  1. There is an error in output
/.../configcat_issue.py
  /.../configcat_issue.py:7:35 - error: Argument of type "LazyLoadingMode" cannot be assigned to parameter "polling_mode" of type "AutoPollingMode" in function "__init__"
    "LazyLoadingMode" is not assignable to "AutoPollingMode" (reportArgumentType)
1 error, 0 warnings, 0 informations

Expected behavior

Type checker shouldn't have any errors on given script

Activity

  1. linked a pull request that will close this issuefix polling mode pyright type error #78on Jan 28, 2026
  2. kp-cat commented on Jan 28, 2026

    @kp-cat
    Member

    Hey @AndreyKuchko ,

    Thanks for reporting the issue.
    We’ll fix it and let you know when the fix is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions