{"id":24770,"library":"types-invoke","title":"Typing stubs for invoke","description":"Unofficial typing stubs for the invoke library, provided by typeshed. Version 2.0.0.10 supports Python 3.7+. These stubs allow type checkers to validate code using invoke, but they may lag behind the invoke library itself.","status":"active","version":"2.0.0.10","language":"python","source_language":"en","source_url":"https://github.com/python/typeshed","tags":["types","stubs","invoke","typing"],"install":[{"cmd":"pip install types-invoke","lang":"bash","label":"pip install"}],"dependencies":[{"reason":"Runtime dependency; stubs are used alongside invoke","package":"invoke","optional":false}],"imports":[{"note":"No common mistake for imports; follow standard invoke patterns.","wrong":"","symbol":"run","correct":"from invoke import run"}],"quickstart":{"code":"from invoke import run\nresult = run('echo hello', hide=True)\nprint(result.stdout)","lang":"python","description":"Use invoke's run function with type stubs enabled."},"warnings":[{"fix":"Consider using `pip install invoke[types]` if available in the future, or rely on inline type hints.","message":"types-invoke is provided by typeshed and may be removed or replaced by stubs in the invoke package itself.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Add `# type: ignore` comments or write custom stubs for unsupported features.","message":"Stubs may not cover all invoke features; some advanced patterns may not type-check correctly.","severity":"gotcha","affected_versions":"all"},{"fix":"Pin to exact version: `types-invoke==2.0.0.10`.","message":"Version 2.0.0.10 is not a standard semantic version; it follows typeshed's calendar versioning. This may confuse dependency resolvers.","severity":"breaking","affected_versions":"2.0.0.10"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install invoke: `pip install invoke`.","cause":"invoke runtime package is missing.","error":"ModuleNotFoundError: No module named 'invoke'"},{"fix":"Run `pip install types-invoke`.","cause":"Pylance/mypy cannot find stubs; types-invoke not installed.","error":"Import \"invoke\" could not be resolved from source"},{"fix":"Check invoke documentation for the correct signature, or update types-invoke.","cause":"Stubs define 'run' differently from actual invoke version.","error":"No overloads for 'run' match arguments"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}