MCPcopy
hub / github.com/pallets/werkzeug / update

Method update

src/werkzeug/routing/map.py:361–375  ·  view source on GitHub ↗

Called before matching and building to keep the compiled rules in the correct order after things changed.

(self)

Source from the content-addressed store, hash-verified

359 )
360
361 def update(self) -> None:
362 """Called before matching and building to keep the compiled rules
363 in the correct order after things changed.
364 """
365 if not self._remap:
366 return
367
368 with self._remap_lock:
369 if not self._remap:
370 return
371
372 self._matcher.update()
373 for rules in self._rules_by_endpoint.values():
374 rules.sort(key=lambda x: x.build_compare_key())
375 self._remap = False
376
377 def __repr__(self) -> str:
378 rules = self.iter_rules()

Callers 15

is_endpoint_expectingMethod · 0.95
iter_rulesMethod · 0.95
stream_encode_multipartFunction · 0.45
from_environMethod · 0.45
get_environMethod · 0.45
__init__Method · 0.45
http.pyFile · 0.45
_find_stat_pathsFunction · 0.45
__call__Method · 0.45
__init__Method · 0.45
matchMethod · 0.45
get_default_redirectMethod · 0.45

Calls 3

sortMethod · 0.80
build_compare_keyMethod · 0.80
valuesMethod · 0.45

Tested by 10

stream_encode_multipartFunction · 0.36
from_environMethod · 0.36
get_environMethod · 0.36
test_etag_responseFunction · 0.36
test_etag_response_412Function · 0.36
test_basic_interfaceMethod · 0.36
test_updateMethod · 0.36