Skip to content

Conversation

@stoyan-atanasov-beye
Copy link
Contributor

@stoyan-atanasov-beye stoyan-atanasov-beye commented Sep 22, 2025

  • Currently get_auth is defined as def get_auth(*_, client_id: str, ...) which accepts arbitrary positional args via *_.
  • The untyped varargs show up to type-checkers (Pylance/Pyright) as Unknown and leads to diagnostics like reportUnknownVariableType in consumer projects (even when python.analysis.useLibraryCodeForTypes is enabled).
  • Replacing *_, with * keeps the function semantics (forces subsequent parameters to be keyword-only) without introducing an untyped parameter that causes analyzer warnings.

Closes #52

… `*_,` so that the function requires keyword-only args without introducing an untyped varargs parameter.


Why:

- Currently `get_auth` is defined as `def get_auth(*_, client_id: str, ...)` which accepts arbitrary positional args via `*_`.
- The untyped varargs show up to type-checkers (Pylance/Pyright) as `Unknown` and leads to diagnostics like `reportUnknownVariableType` in consumer projects (even when `python.analysis.useLibraryCodeForTypes` is enabled).
- Replacing `*_,` with `*` keeps the function semantics (forces subsequent parameters to be keyword-only) without introducing an untyped parameter that causes analyzer warnings.
Copy link
Owner

@HarryMWinters HarryMWinters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for fixing this. Once the other PR is merged I'll cut a release.

@HarryMWinters HarryMWinters merged commit 6a5b854 into HarryMWinters:master Sep 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change get_auth signature: replace '*_' with '*' to avoid untyped varargs

2 participants