ruff: enable FBT rules to detect boolean arguments use without kwargs

This commit is contained in:
Dima Gerasimov 2024-08-27 23:37:17 +01:00
parent 7eef1f9fc2
commit dc0726c347
19 changed files with 50 additions and 39 deletions

View file

@ -135,7 +135,7 @@ def main() -> None:
@main.command(name='populate', short_help='populate influxdb')
@click.option('--reset', is_flag=True, help='Reset Influx measurements before inserting', show_default=True)
@click.argument('FUNCTION_NAME', type=str, required=True)
def populate(function_name: str, reset: bool) -> None:
def populate(*, function_name: str, reset: bool) -> None:
from .__main__ import _locate_functions_or_prompt
[provider] = list(_locate_functions_or_prompt([function_name]))
# todo could have a non-interactive version which populates from all data sources for the provider?