Skip to content

Commit f374f83

Browse files
committed
Fix type errors
1 parent 41c1d2b commit f374f83

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

reportportal_client/_internal/services/client_id.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import io
1818
import logging
1919
import os
20-
from typing import Iterable, Optional, Union
20+
from typing import Iterable, Optional
2121
from uuid import uuid4
2222

2323
from .constants import CLIENT_ID_PROPERTY, RP_FOLDER_PATH, RP_PROPERTIES_FILE_PATH
@@ -33,13 +33,13 @@ def __preprocess_file(self, fp):
3333
content = "[" + self.DEFAULT_SECTION + "]\n" + fp.read()
3434
return io.StringIO(content)
3535

36-
def read(self, filenames: Union[Iterable[str], str], source: Optional[str] = None) -> None:
36+
def read_file(self, filenames: Iterable[str], source: Optional[str] = None) -> None:
3737
if isinstance(filenames, str):
3838
filenames = [filenames]
3939
for filename in filenames:
4040
with open(filename, "r") as fp:
4141
preprocessed_fp = self.__preprocess_file(fp)
42-
self.read_file(preprocessed_fp, filename)
42+
super().read_file(preprocessed_fp, filename)
4343

4444
def write(self, fp, space_around_delimiters: bool = True) -> None:
4545
for key, value in self.items(self.DEFAULT_SECTION):
@@ -50,7 +50,7 @@ def write(self, fp, space_around_delimiters: bool = True) -> None:
5050
def __read_config() -> configparser.ConfigParser:
5151
config = __NoSectionConfigParser()
5252
if os.path.exists(RP_PROPERTIES_FILE_PATH):
53-
config.read(RP_PROPERTIES_FILE_PATH)
53+
config.read_file(RP_PROPERTIES_FILE_PATH)
5454
return config
5555

5656

reportportal_client/_internal/static/abstract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Implementation(Interface):
3636
i = Implementation() -> success
3737
"""
3838

39-
_abc_registry = set()
39+
_abc_registry: set[str] = set()
4040

4141
def __call__(cls, *args, **kwargs):
4242
"""Disable instantiation for the interface classes."""

reportportal_client/core/rp_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class RPFile(object):
2121
"""Class representation for a file that will be attached to the log."""
2222

2323
content: Optional[Any]
24-
content_type: str
24+
content_type: Optional[str]
2525
name: str
2626

2727
def __init__(

0 commit comments

Comments
 (0)