[1m[91merror[]8;;https://ty.dev/rules#invalid-assignment\invalid-assignment]8;;\][0m: [1mObject of type `Overload[(*values: object, *, sep: str | None = " ", end: str | None = "\n", file: SupportsWrite[str] | None = None, flush: Literal[False] = False) -> None, (*values: object, *, sep: str | None = " ", end: str | None = "\n", file: _SupportsWriteAndFlush[str] | None = None, flush: bool) -> None]` is not assignable to `def print(*objects: Any, *, sep: str = " ", end: str = "\n", file: IO[str] | None = None, flush: bool = False) -> None`[0m
  [1m[94m-->[0m __init__.py:15:5
   [1m[94m|[0m
[1m[94m13 |[0m     from rich import print as pretty_print
[1m[94m14 |[0m except Exception:
[1m[94m15 |[0m     pretty_print = print
   [1m[94m|[0m     [1m[33m------------[0m   [1m[91m^^^^^[0m [1m[91mIncompatible value of type `Overload[(*values: object, *, sep: str | None = " ", end: str | None = "\n", file: SupportsWrite[str] | None = None, flush: Literal[False] = False) -> None, (*values: object, *, sep: str | None = " ", end: str | None = "\n", file: _SupportsWriteAndFlush[str] | None = None, flush: bool) -> None]`[0m
   [1m[94m|[0m     [1m[33m|[0m
   [1m[94m|[0m     [1m[33mDeclared type `def print(*objects: Any, *, sep: str = " ", end: str = "\n", file: IO[str] | None = None, flush: bool = False) -> None`[0m
[1m[94m16 |[0m
[1m[94m17 |[0m try:
   [1m[94m|[0m
[1m[94minfo[0m: [1mImplicit shadowing of function `print`, add an annotation to make it explicit if this is intentional[0m
[1m[94minfo[0m: [1mrule `invalid-assignment` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#unresolved-reference\unresolved-reference]8;;\][0m: [1mName `IO` used when not defined[0m
  [1m[94m-->[0m __init__.py:46:20
   [1m[94m|[0m
[1m[94m44 |[0m         config: dict | defaultdict = default_config,
[1m[94m45 |[0m         debug: bool = False,
[1m[94m46 |[0m         output_to: IO[str] = sys.stdout,
   [1m[94m|[0m                    [1m[91m^^[0m
[1m[94m47 |[0m     ):
[1m[94m48 |[0m         """Create an AnsibleLess instance."""
   [1m[94m|[0m
[1m[94minfo[0m: [1mrule `unresolved-reference` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["lines"]` on object of type `list[str]`[0m
   [1m[94m-->[0m __init__.py:306:60
    [1m[94m|[0m
[1m[94m305 |[0m             # sort the hostnames based on text
[1m[94m306 |[0m             sorted_hosts = sorted(groupings, key=lambda x: groupings[x]["lines"])
    [1m[94m|[0m                                                            [1m[91m^^^^^^^^^^^^[0m
[1m[94m307 |[0m             last_host = None
[1m[94m308 |[0m             skip_headers = set()
    [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["status"]` on object of type `list[str]`[0m
   [1m[94m-->[0m __init__.py:313:49
    [1m[94m|[0m
[1m[94m311 |[0m                 # group 'ok' statuses into a single report line with a count
[1m[94m312 |[0m                 ok_count = len(
[1m[94m313 |[0m                     [x for x in sorted_hosts if groupings[x]["status"] == "ok"]
    [1m[94m|[0m                                                 [1m[91m^^^^^^^^^^^^[0m
[1m[94m314 |[0m                 )
[1m[94m315 |[0m                 if ok_count > 1:
    [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["status"]` on object of type `list[str]`[0m
   [1m[94m-->[0m __init__.py:325:49
    [1m[94m|[0m
[1m[94m323 |[0m                 # group 'skipped' statuses into a single report line with a count
[1m[94m324 |[0m                 skipped_count = len(
[1m[94m325 |[0m                     [x for x in sorted_hosts if groupings[x]["status"] == "skipping"]
    [1m[94m|[0m                                                 [1m[91m^^^^^^^^^^^^[0m
[1m[94m326 |[0m                 )
[1m[94m327 |[0m                 if skipped_count > 1:
    [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["status"]` on object of type `list[str]`[0m
   [1m[94m-->[0m __init__.py:339:49
    [1m[94m|[0m
[1m[94m337 |[0m                 # group 'changed' statuses into a single report line with a count
[1m[94m338 |[0m                 changed_count = len(
[1m[94m339 |[0m                     [x for x in sorted_hosts if groupings[x]["status"] == "changed"]
    [1m[94m|[0m                                                 [1m[91m^^^^^^^^^^^^[0m
[1m[94m340 |[0m                 )
[1m[94m341 |[0m                 if changed_count > 1:
    [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["status"]` on object of type `list[str]`[0m
   [1m[94m-->[0m __init__.py:349:49
    [1m[94m|[0m
[1m[94m347 |[0m                 # group 'failed' statuses into a single report line with a count
[1m[94m348 |[0m                 failed_count = len(
[1m[94m349 |[0m                     [x for x in sorted_hosts if groupings[x]["status"] == "failed"]
    [1m[94m|[0m                                                 [1m[91m^^^^^^^^^^^^[0m
[1m[94m350 |[0m                 )
[1m[94m351 |[0m                 if failed_count > 1:
    [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["status"]` on object of type `list[str]`[0m
   [1m[94m-->[0m __init__.py:359:49
    [1m[94m|[0m
[1m[94m357 |[0m                 # group 'fatal' statuses into a single report line with a count
[1m[94m358 |[0m                 fatal_count = len(
[1m[94m359 |[0m                     [x for x in sorted_hosts if groupings[x]["status"] == "fatal"]
    [1m[94m|[0m                                                 [1m[91m^^^^^^^^^^^^[0m
[1m[94m360 |[0m                 )
[1m[94m361 |[0m                 if fatal_count > 1:
    [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["status"]` on object of type `list[str]`[0m
   [1m[94m-->[0m __init__.py:387:20
    [1m[94m|[0m
[1m[94m386 |[0m             for host in sorted_hosts:
[1m[94m387 |[0m                 if groupings[host]["status"] in skip_headers:
    [1m[94m|[0m                    [1m[91m^^^^^^^^^^^^^^^[0m
[1m[94m388 |[0m                     continue
[1m[94m389 |[0m                 status_line = (
    [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["status"]` on object of type `list[str]`[0m
   [1m[94m-->[0m __init__.py:390:45
    [1m[94m|[0m
[1m[94m388 |[0m                     continue
[1m[94m389 |[0m                 status_line = (
[1m[94m390 |[0m                     f"{self.status_prefix} {groupings[host]['status']}: {host}:\n"
    [1m[94m|[0m                                             [1m[91m^^^^^^^^^^^^^^^[0m
[1m[94m391 |[0m                 )
[1m[94m392 |[0m                 if (
    [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["lines"]` on object of type `list[str]`[0m
   [1m[94m-->[0m __init__.py:394:25
    [1m[94m|[0m
[1m[94m392 |[0m                 if (
[1m[94m393 |[0m                     last_host
[1m[94m394 |[0m                     and groupings[last_host]["lines"] == groupings[host]["lines"]
    [1m[94m|[0m                         [1m[91m^^^^^^^^^^^^^^^^^^^^[0m
[1m[94m395 |[0m                 ):
[1m[94m396 |[0m                     buffer.insert(-1, status_line)
    [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["lines"]` on object of type `list[str]`[0m
   [1m[94m-->[0m __init__.py:394:58
    [1m[94m|[0m
[1m[94m392 |[0m                 if (
[1m[94m393 |[0m                     last_host
[1m[94m394 |[0m                     and groupings[last_host]["lines"] == groupings[host]["lines"]
    [1m[94m|[0m                                                          [1m[91m^^^^^^^^^^^^^^^[0m
[1m[94m395 |[0m                 ):
[1m[94m396 |[0m                     buffer.insert(-1, status_line)
    [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["lines"]` on object of type `list[str]`[0m
   [1m[94m-->[0m __init__.py:399:39
    [1m[94m|[0m
[1m[94m397 |[0m                     continue
[1m[94m398 |[0m                 buffer.append(status_line)
[1m[94m399 |[0m                 buffer.append("".join(groupings[host]["lines"]))
    [1m[94m|[0m                                       [1m[91m^^^^^^^^^^^^^^^[0m
[1m[94m400 |[0m                 last_host = host
[1m[94m401 |[0m             self.print_line("".join(buffer))
    [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["status"]` on object of type `list[str]`[0m
  [1m[94m-->[0m tests/test_group_by_hosts.py:44:16
   [1m[94m|[0m
[1m[94m42 |[0m         assert "lines" in results[hostname]
[1m[94m43 |[0m         assert "status" in results[hostname]
[1m[94m44 |[0m         assert results[hostname]["status"] == ok_statuses.get(hostname, "changed")
   [1m[94m|[0m                [1m[91m^^^^^^^^^^^^^^^^^[0m
   [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["status"]` on object of type `list[str]`[0m
  [1m[94m-->[0m tests/test_group_by_hosts.py:70:16
   [1m[94m|[0m
[1m[94m68 |[0m         assert "lines" in results[hostname]
[1m[94m69 |[0m         assert "status" in results[hostname]
[1m[94m70 |[0m         assert results[hostname]["status"] == "changed"
   [1m[94m|[0m                [1m[91m^^^^^^^^^^^^^^^^^[0m
[1m[94m71 |[0m         assert results[hostname]['lines'] == [
[1m[94m72 |[0m             f'=> (item=templateout3.conf)\n',
   [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["lines"]` on object of type `list[str]`[0m
  [1m[94m-->[0m tests/test_group_by_hosts.py:71:16
   [1m[94m|[0m
[1m[94m69 |[0m         assert "status" in results[hostname]
[1m[94m70 |[0m         assert results[hostname]["status"] == "changed"
[1m[94m71 |[0m         assert results[hostname]['lines'] == [
   [1m[94m|[0m                [1m[91m^^^^^^^^^^^^^^^^^[0m
[1m[94m72 |[0m             f'=> (item=templateout3.conf)\n',
[1m[94m73 |[0m         ]
   [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["status"]` on object of type `list[str]`[0m
  [1m[94m-->[0m tests/test_group_by_hosts.py:90:12
   [1m[94m|[0m
[1m[94m88 |[0m     )
[1m[94m89 |[0m
[1m[94m90 |[0m     assert results['host1.localhost']["status"] == "ok"
   [1m[94m|[0m            [1m[91m^^^^^^^^^^^^^^^^^^^^^^^^^^[0m
[1m[94m91 |[0m     assert results['host2.localhost']["status"] == "fatal"
   [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["status"]` on object of type `list[str]`[0m
  [1m[94m-->[0m tests/test_group_by_hosts.py:91:12
   [1m[94m|[0m
[1m[94m90 |[0m     assert results['host1.localhost']["status"] == "ok"
[1m[94m91 |[0m     assert results['host2.localhost']["status"] == "fatal"
   [1m[94m|[0m            [1m[91m^^^^^^^^^^^^^^^^^^^^^^^^^^[0m
[1m[94m92 |[0m
[1m[94m93 |[0m     assert results['host1.localhost']['lines'] == []
   [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["lines"]` on object of type `list[str]`[0m
  [1m[94m-->[0m tests/test_group_by_hosts.py:93:12
   [1m[94m|[0m
[1m[94m91 |[0m     assert results['host2.localhost']["status"] == "fatal"
[1m[94m92 |[0m
[1m[94m93 |[0m     assert results['host1.localhost']['lines'] == []
   [1m[94m|[0m            [1m[91m^^^^^^^^^^^^^^^^^^^^^^^^^^[0m
[1m[94m94 |[0m     assert results['host2.localhost']['lines'] == [
[1m[94m95 |[0m         f'=> (item=templateout1.conf)\n',
   [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-argument-type\invalid-argument-type]8;;\][0m: [1mMethod `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["lines"]` on object of type `list[str]`[0m
  [1m[94m-->[0m tests/test_group_by_hosts.py:94:12
   [1m[94m|[0m
[1m[94m93 |[0m     assert results['host1.localhost']['lines'] == []
[1m[94m94 |[0m     assert results['host2.localhost']['lines'] == [
   [1m[94m|[0m            [1m[91m^^^^^^^^^^^^^^^^^^^^^^^^^^[0m
[1m[94m95 |[0m         f'=> (item=templateout1.conf)\n',
[1m[94m96 |[0m         f'=> (item=templateout3.conf)\n',
   [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-argument-type` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#unresolved-attribute\unresolved-attribute]8;;\][0m: [1mAttribute `write` is not defined on `None` in union `IO[bytes] | None`[0m
 [1m[94m-->[0m tools/test-process.py:6:22
  [1m[94m|[0m
[1m[94m4 |[0m try:
[1m[94m5 |[0m     #process.stdin.write(b"test")
[1m[94m6 |[0m     original_write = process.stdin.write
  [1m[94m|[0m                      [1m[91m^^^^^^^^^^^^^^^^^^^[0m
[1m[94m7 |[0m     def print_wrapper(stuff):
[1m[94m8 |[0m         if process.stdin.closed:
  [1m[94m|[0m
[1m[94minfo[0m: [1mrule `unresolved-attribute` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#unresolved-attribute\unresolved-attribute]8;;\][0m: [1mAttribute `closed` is not defined on `None` in union `IO[bytes] | None`[0m
  [1m[94m-->[0m tools/test-process.py:8:12
   [1m[94m|[0m
[1m[94m 6 |[0m     original_write = process.stdin.write
[1m[94m 7 |[0m     def print_wrapper(stuff):
[1m[94m 8 |[0m         if process.stdin.closed:
   [1m[94m|[0m            [1m[91m^^^^^^^^^^^^^^^^^^^^[0m
[1m[94m 9 |[0m             return
[1m[94m10 |[0m         if isinstance(stuff, str):
   [1m[94m|[0m
[1m[94minfo[0m: [1mrule `unresolved-attribute` is enabled by default[0m

[1m[91merror[]8;;https://ty.dev/rules#invalid-assignment\invalid-assignment]8;;\][0m: [1mObject of type `def print_wrapper(stuff) -> Unknown` is not assignable to attribute `write` on type `IO[bytes] | None`[0m
  [1m[94m-->[0m tools/test-process.py:15:5
   [1m[94m|[0m
[1m[94m13 |[0m             original_write(stuff)
[1m[94m14 |[0m     output_to = process.stdin
[1m[94m15 |[0m     process.stdin.write = print_wrapper
   [1m[94m|[0m     [1m[91m^^^^^^^^^^^^^^^^^^^[0m
[1m[94m16 |[0m     process.communicate()
[1m[94m17 |[0m except IOError as e:
   [1m[94m|[0m
[1m[94minfo[0m: [1mrule `invalid-assignment` is enabled by default[0m

Found 23 diagnostics
