Skip to content

Commit 5881dd0

Browse files
committed
Some doc fixes
1 parent e10b802 commit 5881dd0

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

geoip2/records.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ class Record(object):
99
"""All records are subclasses of ``Record``"""
1010
__metaclass__ = ABCMeta
1111

12-
def __init__(self, **args):
13-
valid_args = dict((k, args.get(k)) for k in self._valid_attributes)
12+
def __init__(self, **kwargs):
13+
valid_args = dict((k, kwargs.get(k)) for k in self._valid_attributes)
1414
self.__dict__.update(valid_args)
1515

1616
def __setattr__(self, name, value):
1717
raise NotImplementedError(name + ' is read-only.')
1818

1919

2020
class PlaceRecord(Record):
21-
"""All records with ```names``` subclass ``PlaceRecord```"""
21+
"""All records with :py:attr:`names` subclass :py:class:`PlaceRecord`"""
2222
__metaclass__ = ABCMeta
2323

2424
# XXX - why did we name it 'name' instead of 'names'?
25-
def __init__(self, languages=None, **args):
25+
def __init__(self, languages=None, **kwargs):
2626
if languages is None:
2727
languages = []
2828
object.__setattr__(self, 'languages', languages)
29-
args['names'] = args.pop('name', [])
30-
super(PlaceRecord, self).__init__(**args)
29+
kwargs['names'] = kwargs.pop('name', [])
30+
super(PlaceRecord, self).__init__(**kwargs)
3131

3232
@property
3333
def name(self):
@@ -219,6 +219,7 @@ class Traits(Record):
219219
and Omni end points.
220220
:ivar user_type: This returns the user type associated with the IP
221221
address. This can be one of the following values:
222+
222223
* business
223224
* cafe
224225
* cellular
@@ -233,6 +234,7 @@ class Traits(Record):
233234
* school
234235
* search_engine_spider
235236
* traveler
237+
236238
This attribute is only available from the Omni end point.
237239
238240
"""
@@ -247,8 +249,8 @@ class Traits(Record):
247249
'organization',
248250
'user_type'])
249251

250-
def __init__(self, languages=None, **args):
252+
def __init__(self, languages=None, **kwargs):
251253
for k in ['is_anonymous_proxy', 'is_satellite_provider',
252254
'is_transparent_proxy']:
253-
args[k] = bool(args.get(k, False))
254-
super(Traits, self).__init__(**args)
255+
kwargs[k] = bool(kwargs.get(k, False))
256+
super(Traits, self).__init__(**kwargs)

0 commit comments

Comments
 (0)