diff --git a/bimmer_connected/account.py b/bimmer_connected/account.py index c0ffbbea..b8e3c86a 100644 --- a/bimmer_connected/account.py +++ b/bimmer_connected/account.py @@ -24,7 +24,7 @@ _LOGGER = logging.getLogger(__name__) -class ConnectedDriveAccount(object): # pylint: disable=too-many-instance-attributes +class ConnectedDriveAccount: # pylint: disable=too-many-instance-attributes """Create a new connection to the BMW Connected Drive web service. :param username: Connected drive user name diff --git a/bimmer_connected/const.py b/bimmer_connected/const.py index e327f418..06aa0f24 100644 --- a/bimmer_connected/const.py +++ b/bimmer_connected/const.py @@ -1,7 +1,7 @@ """Version numbers of bimmer_connected.""" MAJOR_VERSION = 0 MINOR_VERSION = 5 -PATCH_VERSION = 1 +PATCH_VERSION = 2 __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) @@ -9,7 +9,7 @@ """urls for different services.""" -AUTH_URL = 'https://{server}/webapi/oauth/token' +AUTH_URL = 'https://{server}/gcdm/oauth/token' BASE_URL = 'https://{server}/webapi/v1' VEHICLES_URL = BASE_URL + '/user/vehicles' diff --git a/bimmer_connected/remote_services.py b/bimmer_connected/remote_services.py index 91ab0914..99242605 100644 --- a/bimmer_connected/remote_services.py +++ b/bimmer_connected/remote_services.py @@ -39,7 +39,7 @@ class _Services(Enum): REMOTE_AIR_CONDITIONING = 'CLIMATE_NOW' -class RemoteServiceStatus(object): # pylint: disable=too-few-public-methods +class RemoteServiceStatus: # pylint: disable=too-few-public-methods """Wraps the status of the execution of a remote service.""" def __init__(self, response: dict): @@ -58,7 +58,7 @@ def _parse_timestamp(timestamp: str) -> datetime.datetime: return result -class RemoteServices(object): +class RemoteServices: """Trigger remote services on a vehicle.""" def __init__(self, account, vehicle): diff --git a/bimmer_connected/state.py b/bimmer_connected/state.py index 50462752..2b732ac9 100644 --- a/bimmer_connected/state.py +++ b/bimmer_connected/state.py @@ -75,7 +75,7 @@ def _func_wrapper(self: 'VehicleState', *args, **kwargs): return _func_wrapper -class VehicleState(object): # pylint: disable=too-many-public-methods +class VehicleState: # pylint: disable=too-many-public-methods """Models the state of a vehicle.""" def __init__(self, account, vehicle): @@ -326,7 +326,7 @@ def has_check_control_messages(self) -> bool: return len(self.check_control_messages) > 0 -class Lid(object): # pylint: disable=too-few-public-methods +class Lid: # pylint: disable=too-few-public-methods """A lid of the vehicle. Lids are: Doors + Trunk + Hatch @@ -359,7 +359,7 @@ class Window(Lid): # pylint: disable=too-few-public-methods pass -class ConditionBasedServiceReport(object): # pylint: disable=too-few-public-methods +class ConditionBasedServiceReport: # pylint: disable=too-few-public-methods """Entry in the list of condition based services.""" def __init__(self, data: dict): diff --git a/bimmer_connected/vehicle.py b/bimmer_connected/vehicle.py index 6ab9ab9b..7a673052 100644 --- a/bimmer_connected/vehicle.py +++ b/bimmer_connected/vehicle.py @@ -52,7 +52,7 @@ class LscType(Enum): LSC_PHEV = 'LSC_PHEV' -class ConnectedDriveVehicle(object): +class ConnectedDriveVehicle: """Models state and remote services of one vehicle. :param account: ConnectedDrive account this vehicle belongs to diff --git a/test/__init__.py b/test/__init__.py index 51652471..cb2233cf 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -81,7 +81,7 @@ def load_response_json(filename: str) -> dict: return json.load(json_file) -class BackendMock(object): +class BackendMock: """Mock for Connected Drive Backend.""" # pylint: disable=too-many-arguments @@ -90,7 +90,7 @@ def __init__(self) -> None: """Constructor.""" self.last_request = [] self.responses = [ - MockResponse('https://.+/webapi/oauth/token', + MockResponse('https://.+/gcdm/oauth/token', headers=_AUTH_RESPONSE_HEADERS, data_files=['G31_NBTevo/auth_response.json'], status_code=200), @@ -132,7 +132,7 @@ def setup_default_vehicles(self) -> None: data_files=['{path}/status.json'.format(path=path)]) -class MockRequest(object): # pylint: disable=too-few-public-methods +class MockRequest: # pylint: disable=too-few-public-methods """Stores the attributes of a request.""" # pylint: disable=too-many-arguments @@ -146,7 +146,7 @@ def __init__(self, url, headers, data, request_type=None, allow_redirects=None, self.params = params -class MockResponse(object): +class MockResponse: """Mocks requests.response.""" # pylint: disable=too-many-arguments