File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11import argparse
2- import collections
32import contextlib
43import datetime
54import functools
1716import subprocess
1817import types as tt
1918import typing as tp
19+ from collections import abc
2020
2121import cardano_node_tests .utils .types as ttypes
2222
@@ -291,9 +291,10 @@ def tool_has(command: str) -> bool:
291291
292292def flatten (
293293 iterable : tp .Iterable ,
294- ltypes : type [tp .Iterable [ tp . Any ]] = collections . abc . Iterable , # pyright: ignore [reportAttributeAccessIssue]
294+ ltypes : type [tp .Iterable ] | None = None ,
295295) -> tp .Generator :
296296 """Flatten an irregular (arbitrarily nested) iterable of iterables."""
297+ ltypes = ltypes if ltypes is not None else abc .Iterable
297298 remainder = iter (iterable )
298299 while True :
299300 try :
Original file line number Diff line number Diff line change 66import typing as tp
77
88import requests
9+ from requests import auth as rauth
910
1011from cardano_node_tests .utils import cluster_nodes
1112from cardano_node_tests .utils import dbsync_queries
@@ -55,11 +56,11 @@ def __init__(self, instance_num: int) -> None:
5556 self .base_url = f"http://localhost:{ self .port } "
5657 self .auth = self ._get_auth ()
5758
58- def _get_auth (self ) -> requests . auth . HTTPBasicAuth | None : # pyright: ignore [reportAttributeAccessIssue]
59+ def _get_auth (self ) -> rauth . HTTPBasicAuth | None :
5960 """Get Basic Auth credentials if configured."""
6061 admin = os .environ .get ("SMASH_ADMIN" , "admin" )
6162 password = os .environ .get ("SMASH_PASSWORD" , "password" )
62- return requests . auth . HTTPBasicAuth (admin , password ) if admin and password else None # pyright: ignore [reportAttributeAccessIssue]
63+ return rauth . HTTPBasicAuth (admin , password ) if admin and password else None
6364
6465 def get_pool_metadata (self , pool_id : str , pool_meta_hash : str ) -> PoolMetadata :
6566 """Fetch stake pool metadata from SMASH, returning a `PoolMetadata`."""
You can’t perform that action at this time.
0 commit comments