Skip to content

Commit 6acee3a

Browse files
committed
Type fixes
1 parent dcb81fc commit 6acee3a

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

reportportal_client/helpers/common_helpers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# noinspection PyPackageRequirements
3333
import simplejson as json
3434
except ImportError:
35-
import json
35+
import json # type: ignore
3636

3737
logger: logging.Logger = logging.getLogger(__name__)
3838
_T = TypeVar("_T")
@@ -93,7 +93,7 @@ def get(self) -> Optional[_T]:
9393
self.__items = self.__items[:-1]
9494
return result
9595

96-
def last(self) -> _T:
96+
def last(self) -> Optional[_T]:
9797
"""Return the last element from the queue, but does not remove it.
9898
9999
:return: The last element in the queue.
@@ -186,7 +186,7 @@ def gen_attributes(rp_attributes: Iterable[str]) -> list[dict[str, str]]:
186186
return attributes
187187

188188

189-
def get_launch_sys_attrs() -> dict[str, str]:
189+
def get_launch_sys_attrs() -> dict[str, Any]:
190190
"""Generate attributes for the launch containing system information.
191191
192192
:return: dict {'os': 'Windows',
@@ -201,14 +201,14 @@ def get_launch_sys_attrs() -> dict[str, str]:
201201
}
202202

203203

204-
def get_package_parameters(package_name: str, parameters: list[str] = None) -> list[Optional[str]]:
204+
def get_package_parameters(package_name: str, parameters: Optional[list[str]] = None) -> list[Optional[str]]:
205205
"""Get parameters of the given package.
206206
207207
:param package_name: Name of the package.
208208
:param parameters: Wanted parameters.
209209
:return: Parameter List.
210210
"""
211-
result = []
211+
result: list[Optional[str]] = []
212212
if not parameters:
213213
return result
214214

requirements-dev.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ pytest-asyncio
44
black
55
isort
66
types-requests
7-
mypy
7+
mypy==1.19.1
8+
types-simplejson==3.20.0.20250822

0 commit comments

Comments
 (0)