pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/url2pkg/files url2pkg: add type annotation fo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/645e99e65891
branches:  trunk
changeset: 373108:645e99e65891
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Feb 06 17:11:37 2022 +0000

description:
url2pkg: add type annotation for usage

diffstat:

 pkgtools/url2pkg/files/url2pkg.py |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 5b53a9f2a8e1 -r 645e99e65891 pkgtools/url2pkg/files/url2pkg.py
--- a/pkgtools/url2pkg/files/url2pkg.py Sun Feb 06 16:50:09 2022 +0000
+++ b/pkgtools/url2pkg/files/url2pkg.py Sun Feb 06 17:11:37 2022 +0000
@@ -1,5 +1,5 @@
 #! @PYTHONBIN@
-# $NetBSD: url2pkg.py,v 1.35 2022/01/01 15:29:14 rillig Exp $
+# $NetBSD: url2pkg.py,v 1.36 2022/02/06 17:11:37 rillig Exp $
 
 # Copyright (c) 2019 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -47,8 +47,8 @@
 import subprocess
 import sys
 from pathlib import Path
-from typing import Any, Callable, Dict, List, NamedTuple, Optional, Set, \
-    Tuple, Union
+from typing import Any, Callable, Dict, List, NamedTuple, NoReturn, \
+    Optional, Set, Tuple, Union
 
 
 class Var(NamedTuple):
@@ -1203,7 +1203,7 @@
             self.g.bmake('distinfo')
 
 
-def usage():
+def usage() -> NoReturn:
     sys.exit(f'usage: {sys.argv[0]} [-v|--verbose] URL')
 
 



Home | Main Index | Thread Index | Old Index