@@ -31,8 +31,15 @@ def validates(version):
3131 Registered validators and their meta schemas will be considered when
3232 parsing ``$schema`` properties' URIs.
3333
34- :argument str version: an identifier to use as the version's name
35- :returns: a class decorator to decorate the validator with the version
34+ Arguments:
35+
36+ version (str):
37+
38+ An identifier to use as the version's name
39+
40+ Returns:
41+
42+ callable: a class decorator to decorate the validator with the version
3643
3744 """
3845
@@ -226,17 +233,38 @@ class RefResolver(object):
226233 """
227234 Resolve JSON References.
228235
229- :argument str base_uri: URI of the referring document
230- :argument referrer: the actual referring document
231- :argument dict store: a mapping from URIs to documents to cache
232- :argument bool cache_remote: whether remote refs should be cached after
233- first resolution
234- :argument dict handlers: a mapping from URI schemes to functions that
235- should be used to retrieve them
236- :arguments functools.lru_cache urljoin_cache: a cache that will be used for
237- caching the results of joining the resolution scope to subscopes.
238- :arguments functools.lru_cache remote_cache: a cache that will be used for
239- caching the results of resolved remote URLs.
236+ Arguments:
237+
238+ base_uri (str):
239+
240+ The URI of the referring document
241+
242+ referrer:
243+
244+ The actual referring document
245+
246+ store (dict):
247+
248+ A mapping from URIs to documents to cache
249+
250+ cache_remote (bool):
251+
252+ Whether remote refs should be cached after first resolution
253+
254+ handlers (dict):
255+
256+ A mapping from URI schemes to functions that should be used
257+ to retrieve them
258+
259+ urljoin_cache (functools.lru_cache):
260+
261+ A cache that will be used for caching the results of joining
262+ the resolution scope to subscopes.
263+
264+ remote_cache (functools.lru_cache):
265+
266+ A cache that will be used for caching the results of
267+ resolved remote URLs.
240268
241269 """
242270
@@ -275,8 +303,15 @@ def from_schema(cls, schema, *args, **kwargs):
275303 """
276304 Construct a resolver from a JSON schema object.
277305
278- :argument schema: the referring schema
279- :rtype: :class:`RefResolver`
306+ Arguments:
307+
308+ schema:
309+
310+ the referring schema
311+
312+ Returns:
313+
314+ :class:`RefResolver`
280315
281316 """
282317
@@ -320,7 +355,11 @@ def resolving(self, ref):
320355 Context manager which resolves a JSON ``ref`` and enters the
321356 resolution scope of this ref.
322357
323- :argument str ref: reference to resolve
358+ Arguments:
359+
360+ ref (str):
361+
362+ The reference to resolve
324363
325364 """
326365
@@ -351,8 +390,15 @@ def resolve_fragment(self, document, fragment):
351390 """
352391 Resolve a ``fragment`` within the referenced ``document``.
353392
354- :argument document: the referrant document
355- :argument str fragment: a URI fragment to resolve within it
393+ Arguments:
394+
395+ document:
396+
397+ The referrant document
398+
399+ fragment (str):
400+
401+ a URI fragment to resolve within it
356402
357403 """
358404
@@ -394,8 +440,15 @@ def resolve_remote(self, uri):
394440 If it isn't, or if the scheme of the ``uri`` is not ``http`` or
395441 ``https``, UTF-8 is assumed.
396442
397- :argument str uri: the URI to resolve
398- :returns: the retrieved document
443+ Arguments:
444+
445+ uri (str):
446+
447+ The URI to resolve
448+
449+ Returns:
450+
451+ The retrieved document
399452
400453 .. _requests: http://pypi.python.org/pypi/requests/
401454
@@ -448,10 +501,19 @@ def validate(instance, schema, cls=None, *args, **kwargs):
448501 (e.g. :meth:`Draft4Validator.validate`).
449502
450503
451- :argument instance: the instance to validate
452- :argument schema: the schema to validate with
453- :argument cls: an :class:`IValidator` class that will be used to validate
454- the instance.
504+ Arguments:
505+
506+ instance:
507+
508+ The instance to validate
509+
510+ schema:
511+
512+ The schema to validate with
513+
514+ cls (:class:`IValidator`):
515+
516+ The class that will be used to validate the instance.
455517
456518 If the ``cls`` argument is not provided, two things will happen in
457519 accordance with the specification. First, if the schema has a
@@ -464,7 +526,8 @@ def validate(instance, schema, cls=None, *args, **kwargs):
464526 Any other provided positional and keyword arguments will be passed on when
465527 instantiating the ``cls``.
466528
467- :raises:
529+ Raises:
530+
468531 :exc:`ValidationError` if the instance is invalid
469532
470533 :exc:`SchemaError` if the schema itself is invalid
0 commit comments