flinventory 0.5.0__py3-none-any.whl → 0.5.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- flinventory/location.py +5 -2
- {flinventory-0.5.0.dist-info → flinventory-0.5.1.dist-info}/METADATA +1 -1
- {flinventory-0.5.0.dist-info → flinventory-0.5.1.dist-info}/RECORD +6 -6
- {flinventory-0.5.0.dist-info → flinventory-0.5.1.dist-info}/WHEEL +0 -0
- {flinventory-0.5.0.dist-info → flinventory-0.5.1.dist-info}/entry_points.txt +0 -0
- {flinventory-0.5.0.dist-info → flinventory-0.5.1.dist-info}/licenses/LICENSE +0 -0
flinventory/location.py
CHANGED
@@ -283,6 +283,9 @@ class Location(dict[str, Value]):
|
|
283
283
|
options: global options including the seperator
|
284
284
|
"""
|
285
285
|
|
286
|
+
EMPTY = [None, "", [], {}]
|
287
|
+
"""Values that are considered empty and mean that nothing should be saved."""
|
288
|
+
|
286
289
|
def __init__(
|
287
290
|
self,
|
288
291
|
schema: Schema,
|
@@ -356,11 +359,11 @@ class Location(dict[str, Value]):
|
|
356
359
|
def __setitem__(self, level: str, value: Value) -> None:
|
357
360
|
"""Set one level info.
|
358
361
|
|
359
|
-
Or deletes it if it's None or "" or [] or {}
|
362
|
+
Or deletes it if it's None or "" or [] or {} (see EMPTY)
|
360
363
|
|
361
364
|
Update internal info.
|
362
365
|
"""
|
363
|
-
if value in
|
366
|
+
if value in self.EMPTY:
|
364
367
|
if level in self:
|
365
368
|
del self[level]
|
366
369
|
else:
|
@@ -1,7 +1,7 @@
|
|
1
|
-
flinventory-0.5.
|
2
|
-
flinventory-0.5.
|
3
|
-
flinventory-0.5.
|
4
|
-
flinventory-0.5.
|
1
|
+
flinventory-0.5.1.dist-info/METADATA,sha256=y4LaWD4HqdxHs4Uh_mWxWdHBM7kM6CrF2u_G_xl1IGU,4907
|
2
|
+
flinventory-0.5.1.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
|
3
|
+
flinventory-0.5.1.dist-info/entry_points.txt,sha256=De3jjbHfy68_ZrwdjywlgrSUCn4QhqZGI0CJJt9S8_c,78
|
4
|
+
flinventory-0.5.1.dist-info/licenses/LICENSE,sha256=9c-AWlAEeFMmn1aODEfabsw2he-SpQeykurYw-KqSdw,34478
|
5
5
|
flinventory/__init__.py,sha256=0HTGxw9J-2KnbxQbzX6HH-Pztkp0BEjiHANhndfbtYM,270
|
6
6
|
flinventory/__main__.py,sha256=5U_RxWDlnhzlC98RaE8SkejjiYjv27OLdm5DPYgL4Gw,1295
|
7
7
|
flinventory/box.py,sha256=rk7yrAjVdxcrpvmTMt3jkMVOAoQNJfqoSig9U2S3yJ0,10480
|
@@ -10,7 +10,7 @@ flinventory/datacleanup.py,sha256=_CImmWJhq5uKz21jJQUqKYoQfbHEYA0000RyPRt5BI0,11
|
|
10
10
|
flinventory/defaulted_data.py,sha256=KAy6V2KLcifLg7zHBFnx_eFLp31sCWih1Btp6cE0bQc,21585
|
11
11
|
flinventory/generate_labels.py,sha256=wB9ibokHOcab599qZhi5uTzfy3DTo3wT4DJP9qLMzXs,6642
|
12
12
|
flinventory/inventory_io.py,sha256=OWThcf9nzeZNqvNpzQiBhESQAnVXC7hUA8DEVzq-w-Y,12561
|
13
|
-
flinventory/location.py,sha256=
|
13
|
+
flinventory/location.py,sha256=Oa6ypkZAMvpFVn12MFiIaNUQhpWvo2fuaEKcfAQVWbI,16846
|
14
14
|
flinventory/sign.py,sha256=8G7fsne3Nsf8zZKKTUl40uWMNsWIv7FYV2KcqBR2MQI,5515
|
15
15
|
flinventory/signprinter_latex.py,sha256=Ytf1T_ADedj_Wkqe8bWyN23-TwFaKE7zFpeoYxn5NzM,19105
|
16
16
|
flinventory/thing.py,sha256=86fXj3RwTbkCdVVWrbyO-VEW_e5lKJlV8PPt1Xf8ejY,5079
|
@@ -20,4 +20,4 @@ flinventory/thingtemplate_latex/sign.tex,sha256=cVlOjImuS97Gf19MGW27HiP6Uw8JNnob
|
|
20
20
|
flinventory/thingtemplate_latex/signlist-footer.tex,sha256=LcZw5__h8SqgMmYxs5oLbXLaFTQlx_X5rtYnpxwUh9Y,14
|
21
21
|
flinventory/thingtemplate_latex/signlist-header.tex,sha256=F1J4aSPq6QO_Ved4Zn7-rytP1vDkdWTqjjtGJpe_FDg,297
|
22
22
|
flinventory/thingtemplate_latex/signs-example.tex,sha256=J6eCcPhP0Xklgn8xnSenDOvjzmc_NGmakWU4RGbeUtM,3090
|
23
|
-
flinventory-0.5.
|
23
|
+
flinventory-0.5.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|