pyquoks 2.3.2__tar.gz → 2.3.2.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyquoks
3
- Version: 2.3.2
3
+ Version: 2.3.2.1
4
4
  Summary: Пакет PyPI для часто используемых модулей в проектах diquoks
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pyquoks"
3
- version = "2.3.2"
3
+ version = "2.3.2.1"
4
4
  description = "Пакет PyPI для часто используемых модулей в проектах diquoks"
5
5
  authors = [
6
6
  { name = "Denis Titovets <den232titovets@yandex.ru>" }
@@ -331,7 +331,14 @@ class ConfigManager(utils._HasRequiredAttributes):
331
331
 
332
332
  setattr(self, attribute, value)
333
333
 
334
- self._config.set(self._SECTION, attribute, value)
334
+ match object_type():
335
+ case bool() | int() | float() | str():
336
+ self._config.set(self._SECTION, attribute, str(value))
337
+ case dict() | list():
338
+ self._config.set(self._SECTION, attribute, json.dumps(value))
339
+ case _:
340
+ raise ValueError(f"{object_type.__name__} type is not supported!")
341
+
335
342
  with open(self._parent._PATH, "w", encoding="utf-8") as file:
336
343
  self._config.write(file)
337
344
 
File without changes
File without changes
File without changes
File without changes