@@ -237,11 +237,18 @@ class RefResolver(object):
237
237
expensive calls. Should support the `functools.lru_cache` interface.
238
238
:argument int cache_maxsize: number of items to store in the cache. Set
239
239
this to 0 to disable caching. Defaults to 1000.
240
+
240
241
"""
241
242
242
243
def __init__ (
243
- self , base_uri , referrer , store = (), cache_remote = True , handlers = (),
244
- cache_func = lru_cache , cache_maxsize = 1000 ,
244
+ self ,
245
+ base_uri ,
246
+ referrer ,
247
+ store = (),
248
+ cache_remote = True ,
249
+ handlers = (),
250
+ cache_func = lru_cache ,
251
+ cache_maxsize = 1000 ,
245
252
):
246
253
# This attribute is not used, it is for backwards compatibility
247
254
self .referrer = referrer
@@ -282,7 +289,8 @@ def pop_scope(self):
282
289
raise RefResolutionError (
283
290
"Failed to pop the scope from an empty stack. "
284
291
"`pop_scope()` should only be called once for every "
285
- "`push_scope()`" )
292
+ "`push_scope()`" ,
293
+ )
286
294
287
295
@property
288
296
def resolution_scope (self ):
@@ -293,8 +301,6 @@ def base_uri(self):
293
301
uri , _ = urldefrag (self .resolution_scope )
294
302
return uri
295
303
296
- # Deprecated, this function is no longer used, but is preserved for
297
- # backwards compatibility
298
304
@contextlib .contextmanager
299
305
def in_scope (self , scope ):
300
306
self .push_scope (scope )
@@ -303,8 +309,6 @@ def in_scope(self, scope):
303
309
finally :
304
310
self .pop_scope ()
305
311
306
- # Deprecated, this function is no longer used, but is preserved for
307
- # backwards compatibility
308
312
@contextlib .contextmanager
309
313
def resolving (self , ref ):
310
314
"""
0 commit comments