From 6004db7ce6443a0fea1055bd60be35ae12b8a18b Mon Sep 17 00:00:00 2001 From: Samuel Giffard Date: Fri, 17 Mar 2023 10:10:37 +0100 Subject: [PATCH] mypy: pglookout/current-master.py [BF-1560] Also in this commit: - removed `python2` leftovers (from pglookout 2.0.0 (2018-10-12)) --- debian/rules | 2 +- pglookout/current_master.py | 4 ++-- pyproject.toml | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/debian/rules b/debian/rules index 5184822..c33a948 100755 --- a/debian/rules +++ b/debian/rules @@ -3,4 +3,4 @@ export PYBUILD_NAME=pglookout %: - dh $@ --with python2 --with systemd --buildsystem=pybuild + dh $@ --with python3 --with systemd --buildsystem=pybuild diff --git a/pglookout/current_master.py b/pglookout/current_master.py index 0824feb..8f7154f 100644 --- a/pglookout/current_master.py +++ b/pglookout/current_master.py @@ -8,7 +8,7 @@ See the file `LICENSE` for details. """ -from __future__ import print_function +from __future__ import annotations from . import version @@ -19,7 +19,7 @@ import time -def main(args=None): +def main(args: list[str] | None = None) -> int: if args is None: args = sys.argv[1:] diff --git a/pyproject.toml b/pyproject.toml index 16ce87c..2b651ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,6 @@ exclude = [ 'pglookout/__main__.py', 'pglookout/cluster_monitor.py', 'pglookout/common.py', - 'pglookout/current_master.py', 'pglookout/logutil.py', 'pglookout/pglookout.py', 'pglookout/pgutil.py',