Commodore provides opinionated tenant-aware management of Kapitan inventories and templates. Commodore uses Kapitan for the heavy lifting of rendering templates and resolving a hierachical configuration structure.
Mypy has started raising an error for generator functions (i.e. functions which use the yield keyword) which also contain a return statement.
From what I found in the docs, using yield makes the function return a generator in all cases. If execution hits a flow which doesn't encounter a yield statement (e.g. because the top-level condition is false) that generator will immediately raise a StopIteration exception.
Checklist
[x] Keep pull requests small so they can be easily reviewed.
[x] Categorize the PR by setting a good title and adding one of the labels:
bug, enhancement, documentation, change, breaking, dependency, internal
as they show up in the changelog
Mypy has started raising an error for generator functions (i.e. functions which use the
yield
keyword) which also contain areturn
statement.From what I found in the docs, using yield makes the function return a generator in all cases. If execution hits a flow which doesn't encounter a yield statement (e.g. because the top-level condition is false) that generator will immediately raise a StopIteration exception.
Checklist
bug
,enhancement
,documentation
,change
,breaking
,dependency
,internal
as they show up in the changelog