Skip to content

Add super for mro #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion fmrest/foundset.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Foundset(object):

Foundsets are used for both find results and portal data (related records)
"""
def __init__(self, records: Iterator, info: Dict = {}) -> None:
def __init__(self, records: Iterator, info: Dict = {}, *args, **kwargs) -> None:
"""Initialize the Foundset class.

The foundset is cached while being consumed, so that subsequent iterations are possible.
Expand All @@ -24,6 +24,7 @@ def __init__(self, records: Iterator, info: Dict = {}) -> None:
Dictionary of information about the foundset. This is 1:1 the dictionary that
is delivered by FMS for any foundset.
"""
super(Foundset, self).__init__(*args, **kwargs)
self._records = records
self._consumed = False
self._info = info
Expand Down
5 changes: 3 additions & 2 deletions fmrest/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Record(object):
__slots__ = ('_keys', '_values', '_in_portal', '_modifications')

def __init__(self, keys: List[str], values: List[Any],
in_portal: bool = False, type_conversion: bool = False) -> None:
in_portal: bool = False, type_conversion: bool = False, *args, **kwargs) -> None:
"""Initialize the Record class.

Parameters
Expand All @@ -31,7 +31,8 @@ def __init__(self, keys: List[str], values: List[Any],
type of a requested field value. Be cautious with this parameter!
Values will be converted into int, float, datetime, timedelta, string.
"""

super(Record, self).__init__(*args, **kwargs)

self._keys = keys

self._values: List[Any]
Expand Down
4 changes: 3 additions & 1 deletion fmrest/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def __init__(self, url: str, user: str,
data_sources: Optional[List[Dict]] = None,
verify_ssl: Union[bool, str] = True,
type_conversion: bool = False,
auto_relogin: bool = False) -> None:
auto_relogin: bool = False,
*args, **kwargs) -> None:
"""Initialize the Server class.

Parameters
Expand Down Expand Up @@ -79,6 +80,7 @@ def __init__(self, url: str, user: str,
request comes back with a 952 (invalid token) error. Defaults to
False.
"""
super(Server, self).__init__(*args, **kwargs)

self.url = url
self.user = user
Expand Down