flinventory 0.5.0__tar.gz → 0.5.1__tar.gz

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.
Files changed (24) hide show
  1. {flinventory-0.5.0 → flinventory-0.5.1}/PKG-INFO +1 -1
  2. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/location.py +5 -2
  3. {flinventory-0.5.0 → flinventory-0.5.1}/pyproject.toml +1 -1
  4. {flinventory-0.5.0 → flinventory-0.5.1}/LICENSE +0 -0
  5. {flinventory-0.5.0 → flinventory-0.5.1}/README.md +0 -0
  6. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/__init__.py +0 -0
  7. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/__main__.py +0 -0
  8. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/box.py +0 -0
  9. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/constant.py +0 -0
  10. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/datacleanup.py +0 -0
  11. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/defaulted_data.py +0 -0
  12. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/generate_labels.py +0 -0
  13. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/inventory_io.py +0 -0
  14. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/sign.py +0 -0
  15. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/signprinter_latex.py +0 -0
  16. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/thing.py +0 -0
  17. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/thingtemplate_latex/.gitignore +0 -0
  18. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/thingtemplate_latex/dummyImage.jpg +0 -0
  19. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/thingtemplate_latex/sign.tex +0 -0
  20. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/thingtemplate_latex/signlist-footer.tex +0 -0
  21. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/thingtemplate_latex/signlist-header.tex +0 -0
  22. {flinventory-0.5.0 → flinventory-0.5.1}/flinventory/thingtemplate_latex/signs-example.tex +0 -0
  23. {flinventory-0.5.0 → flinventory-0.5.1}/tests/__init__.py +0 -0
  24. {flinventory-0.5.0 → flinventory-0.5.1}/tests/test_defaulted_data.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: flinventory
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: An inventory system for self-help repair shops
5
5
  Author-Email: flukx <flinventory-flukx@612211124.xyz>
6
6
  License: GPL3
@@ -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 [None, "", [], {}]:
366
+ if value in self.EMPTY:
364
367
  if level in self:
365
368
  del self[level]
366
369
  else:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "flinventory"
3
- version = "0.5.0"
3
+ version = "0.5.1"
4
4
  description = "An inventory system for self-help repair shops"
5
5
  authors = [
6
6
  { name = "flukx", email = "flinventory-flukx@612211124.xyz" },
File without changes
File without changes