Skip to content

config.py: dict[str, any] uses builtin any instead of typing.Any #23

Description

@mdvnavy

Location

client_discovery/config.pyload_and_validate_config() return annotation (~line 18)

Problem

The return type annotation is written as:

def load_and_validate_config() -> dict[str, any]:

any here is the Python builtin function, not typing.Any. As an annotation it is semantically incorrect — type checkers (mypy/pyright) and IDEs can't infer the intended "any value" meaning, and it will confuse readers.

Fix

Either:

from typing import Any
def load_and_validate_config() -> dict[str, Any]:

or a more precise type such as dict[str, object].

Source

Originally raised in review of PR #21 (now docs-only): outdated thread PRRT_kwDOSzLAqc6JYBhT. Confirmed still present on main.

/tracked-issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions