dublib 0.6.1__tar.gz → 0.6.2__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.1
2
2
  Name: dublib
3
- Version: 0.6.1
3
+ Version: 0.6.2
4
4
  Summary: Коллекция модулей от DUB1401.
5
5
  Author-email: DUB1401 <vlad.milosta@outlook.com>
6
6
  License: This is free and unencumbered software released into the public domain.
@@ -3,7 +3,7 @@ requires = ["setuptools", "cython"]
3
3
 
4
4
  [project]
5
5
  name = "dublib"
6
- version = "0.6.1"
6
+ version = "0.6.2"
7
7
  description = "Коллекция модулей от DUB1401."
8
8
  authors = [
9
9
  {name = "DUB1401", email = "vlad.milosta@outlook.com"}
@@ -129,15 +129,16 @@ class UserData:
129
129
  # Сохранение данных.
130
130
  self.__SaveData()
131
131
 
132
- def create_property(self, key: str, value: any):
132
+ def create_property(self, key: str, value: any, force: bool = True):
133
133
  """
134
134
  Создаёт свойство пользователя и задаёт ему значение, если такового ещё не существует.
135
135
  key – ключ свойства;
136
- value – значение.
136
+ value – значение;
137
+ force – указывает, необходимо ли перезаписывать значение уже существующего ключа.
137
138
  """
138
139
 
139
140
  # Если свойства не существует.
140
- if key not in self.__Data["data"].keys():
141
+ if key not in self.__Data["data"].keys() or force:
141
142
  # Создание свойства.
142
143
  self.__Data["data"][key] = value
143
144
  # Сохранение данных.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dublib
3
- Version: 0.6.1
3
+ Version: 0.6.2
4
4
  Summary: Коллекция модулей от DUB1401.
5
5
  Author-email: DUB1401 <vlad.milosta@outlook.com>
6
6
  License: This is free and unencumbered software released into the public domain.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes