Skip to content

Commit 9495a65

Browse files
committed
chore: annotate Tool for output at least
Signed-off-by: Brian Harring <ferringb@gmail.com>
1 parent b96561b commit 9495a65

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

src/pkgcheck/scripts/pkgcheck_cache.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22

3+
import snakeoil.formatters
34
from snakeoil.cli import arghparse
45
from snakeoil.osutils import pjoin
56

@@ -68,7 +69,7 @@ def _validate_cache_args(parser, namespace):
6869

6970

7071
@cache.bind_main_func
71-
def _cache(options, out, err):
72+
def _cache(options, out: snakeoil.formatters.PlainTextFormatter, _err):
7273
if options.remove_cache:
7374
cache_obj = CachedAddon(options)
7475
cache_obj.remove_caches()

src/pkgcheck/scripts/pkgcheck_ci.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def parse_known_args(self, args=None, namespace=None):
2828

2929

3030
@ci.bind_main_func
31-
def _ci(options, out, err):
31+
def _ci(options, out: PlainTextFormatter, _err):
3232
pipe = scan(options.args)
3333

3434
with reporters.FancyReporter(out) as reporter:

src/pkgcheck/scripts/pkgcheck_replay.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import snakeoil.formatters
12
from snakeoil.cli import arghparse
23

34
from .. import reporters
@@ -25,7 +26,7 @@
2526

2627

2728
@replay.bind_main_func
28-
def _replay(options, out, err):
29+
def _replay(options, out: snakeoil.formatters.PlainTextFormatter, _err):
2930
processed = 0
3031

3132
with options.reporter(out) as reporter:

src/pkgcheck/scripts/pkgcheck_scan.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from contextlib import ExitStack
55
from unittest.mock import patch
66

7+
import snakeoil.formatters
78
from pkgcore import const as pkgcore_const
89
from pkgcore.repository import errors as repo_errors
910
from pkgcore.repository import multiplex
@@ -516,7 +517,7 @@ def _determine_restrictions(namespace, attr):
516517

517518

518519
@scan.bind_main_func
519-
def _scan(options, out, err):
520+
def _scan(options, out: snakeoil.formatters.PlainTextFormatter, _err):
520521
with ExitStack() as stack:
521522
report = stack.enter_context(options.reporter(out))
522523
for c in options.pop("contexts"):

src/pkgcheck/scripts/pkgcheck_show.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from operator import attrgetter
44

55
from snakeoil.cli import arghparse
6-
from snakeoil.formatters import decorate_forced_wrapping
6+
from snakeoil.formatters import PlainTextFormatter, decorate_forced_wrapping
77

88
from .. import base, objects
99
from ..addons.caches import CachedAddon
@@ -176,7 +176,7 @@ def display_reporters(out, options):
176176

177177

178178
@show.bind_main_func
179-
def _show(options, out, err):
179+
def _show(options, out: PlainTextFormatter, _err):
180180
if options.checks:
181181
display_checks(out, options)
182182
elif options.scopes:

0 commit comments

Comments
 (0)