MCPcopy
hub / github.com/qtile/qtile / add_defaults

Method add_defaults

libqtile/configurable.py:11–17  ·  view source on GitHub ↗

Add defaults to this object, overwriting any which already exist

(self, defaults)

Source from the content-addressed store, hash-verified

9 self._user_config = config
10
11 def add_defaults(self, defaults):
12 """Add defaults to this object, overwriting any which already exist"""
13 # Since we can't check for immutability reliably, shallow copy the
14 # value. If a mutable value were set and it were changed in one place
15 # it would affect all other instances, since this is typically called
16 # on __init__
17 self._variable_defaults.update((d[0], copy.copy(d[1])) for d in defaults)
18
19 def __getattr__(self, name):
20 if name == "_variable_defaults":

Callers 15

__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80

Calls 1

updateMethod · 0.45

Tested by 2

__init__Method · 0.64
__init__Method · 0.64