Skip to content

Commit f351d3d

Browse files
committed
Fix pylint errors.
1 parent efa3d2c commit f351d3d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

boxsdk/object/base_object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def __getitem__(self, item):
5757

5858
def __repr__(self):
5959
"""Base class override. Return a human-readable representation using the Box ID or name of the object."""
60-
description = self.name if 'name' in self._response_object else self.object_id
60+
description = self.name if 'name' in self._response_object else self.object_id # pylint:disable=no-member
6161
return '<Box {0} ({1})>'.format(self.__class__.__name__, description)
6262

6363
def get_url(self, *args):

boxsdk/object/item.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def get_shared_link(
284284
allow_preview=allow_preview,
285285
password=password,
286286
)
287-
return item.shared_link['url']
287+
return item.shared_link['url'] # pylint:disable=no-member
288288

289289
def remove_shared_link(self, etag=None):
290290
"""Delete the shared link for the item.
@@ -301,7 +301,7 @@ def remove_shared_link(self, etag=None):
301301
"""
302302
data = {'shared_link': None}
303303
item = self.update_info(data, etag=etag)
304-
return item.shared_link is None
304+
return item.shared_link is None # pylint:disable=no-member
305305

306306
def delete(self, params=None, etag=None):
307307
"""Delete the item.

test/unit/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import unicode_literals
44
import json
5-
from mock import Mock
5+
from mock import Mock, MagicMock
66
import pytest
77
from boxsdk.auth.oauth2 import DefaultNetwork
88
from boxsdk.network import default_network
@@ -12,7 +12,7 @@
1212

1313
@pytest.fixture()
1414
def mock_box_session():
15-
return Mock(BoxSession)
15+
return MagicMock(BoxSession)
1616

1717

1818
@pytest.fixture(scope='function')

test/unit/object/test_base_object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test_getattr_and_getitem(test_object_and_response, mock_box_session):
6363
mock_box_session.put.return_value = mock_object_response
6464
update_response = BaseObject.update_info(test_object, {})
6565
assert isinstance(update_response, test_object.__class__)
66-
assert update_response.object_id == update_response.id == update_response['id']
66+
assert update_response.object_id == update_response.id == update_response['id'] # pylint:disable=no-member
6767

6868

6969
def test_get_url(test_object_and_response):

0 commit comments

Comments
 (0)