From 0eea239f6b837f16f3752847f00b150fbb60ac3b Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Fri, 7 Jul 2023 09:33:30 +0200 Subject: [PATCH] Compatibility with click==8.1.4 (#2736) They somehow messed up with type hints what made pyright unhappy. To solve it we explicitly pass the Group class to the group() decorator. In addition to that bump pyright version. --- .github/workflows/tests.yaml | 2 +- patroni/ctl.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 78cce057..59a53c6e 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -173,4 +173,4 @@ jobs: - uses: jakebailey/pyright-action@v1 with: - version: 1.1.315 + version: 1.1.316 diff --git a/patroni/ctl.py b/patroni/ctl.py index 8e231466..12463aad 100644 --- a/patroni/ctl.py +++ b/patroni/ctl.py @@ -258,7 +258,7 @@ option_insecure = click.option('-k', '--insecure', is_flag=True, help='Allow con role_choice = click.Choice(['leader', 'primary', 'standby-leader', 'replica', 'standby', 'any', 'master']) -@click.group() +@click.group(cls=click.Group) @click.option('--config-file', '-c', help='Configuration file', envvar='PATRONICTL_CONFIG_FILE', default=CONFIG_FILE_PATH) @click.option('--dcs-url', '--dcs', '-d', 'dcs_url', help='The DCS connect url', envvar='DCS_URL')