annofabcli 1.106.1__py3-none-any.whl → 1.106.2__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.
@@ -152,13 +152,26 @@ class AnnotationConverter:
152
152
 
153
153
  def _convert_attribute_value( # noqa: PLR0911, PLR0912
154
154
  self,
155
- attribute_value: Union[str, int, bool], # noqa: FBT001
155
+ attribute_value: Optional[Union[str, int, bool]], # noqa: FBT001
156
156
  additional_data_type: AdditionalDataDefinitionType,
157
157
  attribute_name: str,
158
158
  choices: list[dict[str, Any]],
159
159
  *,
160
160
  log_message_suffix: str,
161
161
  ) -> Optional[dict[str, Any]]:
162
+ """
163
+ JSONに記載されている属性値を、APIに渡すための `AdditionalDataValue`スキーマに変換します。
164
+
165
+ Args:
166
+ attribute_value: 属性値。 `None`の場合は、Noneを返します。
167
+ additional_data_type: 属性の型
168
+ attribute_name: 属性名
169
+ choices: 選択肢情報。`AdditionalDataDefinitionType.CHOICE`や`AdditionalDataDefinitionType.SELECT`の場合に利用する。
170
+ log_message_suffix: ログメッセージのサフィックス
171
+ """
172
+ if attribute_value is None:
173
+ return None
174
+
162
175
  if additional_data_type == AdditionalDataDefinitionType.FLAG:
163
176
  if not isinstance(attribute_value, bool):
164
177
  message = f"属性'{attribute_name}'に対応する属性値の型は bool である必要があります。 :: attribute_value='{attribute_value}', additional_data_type='{additional_data_type}' :: {log_message_suffix}" # noqa: E501
@@ -221,7 +221,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
221
221
  def add_parser(subparsers: Optional[argparse._SubParsersAction] = None) -> argparse.ArgumentParser:
222
222
  subcommand_name = "copy"
223
223
  subcommand_help = "タスクをコピーします。"
224
- description = "タスクをコピーします。"
224
+ description = "タスクをコピーします。タスクに含まれるアノテーションはコピーされません。"
225
225
  epilog = "オーナロールを持つユーザで実行してください。"
226
226
 
227
227
  parser = annofabcli.common.cli.add_parser(subparsers, subcommand_name, subcommand_help, description, epilog=epilog)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: annofabcli
3
- Version: 1.106.1
3
+ Version: 1.106.2
4
4
  Summary: Utility Command Line Interface for AnnoFab
5
5
  Author: Kurusugawa Computer Inc.
6
6
  License: MIT
@@ -10,7 +10,7 @@ annofabcli/annotation/copy_annotation.py,sha256=Pih2k3vvpgfT3Ovb3gZw2L_8fK_ws_wK
10
10
  annofabcli/annotation/delete_annotation.py,sha256=hQApNrx2Ci1bBWk0dRGA0oJkIgDHwl6Jy0-33gYF6jo,22989
11
11
  annofabcli/annotation/download_annotation_zip.py,sha256=P_ZpdqIaSFEmB8jjpdykcRhh2tVlHxSlXFrYreJjShE,3282
12
12
  annofabcli/annotation/dump_annotation.py,sha256=Q-p6f5XBs7khDgrfY5Q3CGLBMKEerJWO_CQ8_73UXVM,9972
13
- annofabcli/annotation/import_annotation.py,sha256=39w-LwhNrT4-20NR5Hy-cn_cUFVVWVnMp9x1d8aITn0,33369
13
+ annofabcli/annotation/import_annotation.py,sha256=xCNnVEd8Ss6aN1XdDsTDf3AuRyB1ocAr0ofbxX1bWSc,33997
14
14
  annofabcli/annotation/list_annotation.py,sha256=uKcOuGC7lzd6vVbzizkiZtYdXJ7EzY0iifuiqKl2wQM,10707
15
15
  annofabcli/annotation/list_annotation_count.py,sha256=T9fbaoxWeDJIVgW_YgHRldbwrVZWiE-57lfJrDQrj80,6474
16
16
  annofabcli/annotation/merge_segmentation.py,sha256=kIsCeXtJxzd6nobQPpi0fscaRDlTx3tg1qpy5PDfSJI,18107
@@ -186,7 +186,7 @@ annofabcli/task/change_operator.py,sha256=1LLpez79ezW_MqcNN608kjxp3xTS1uRRioqcug
186
186
  annofabcli/task/change_status_to_break.py,sha256=hwdFTFW-zV0VxuinoBB5n6mvHJ7g9ChjrSOXZcNk88w,8621
187
187
  annofabcli/task/change_status_to_on_hold.py,sha256=vWRyk6IK3HcgTWDIbbhXzsrtuoa7OlXCf8CvUpFp_Uw,12981
188
188
  annofabcli/task/complete_tasks.py,sha256=ssg_Z7ADRQRXvXgK2k5TEmvbRjrJQ33cXeb8kG8Y3jc,24917
189
- annofabcli/task/copy_tasks.py,sha256=9TN0oykJbTZHSF8p16CHC4Ezay5Ezx6-S_p0-FRUtms,8667
189
+ annofabcli/task/copy_tasks.py,sha256=66C1NQq46d6HenLpQCnkTjiXedL4iVtCu6qUimosVyU,8742
190
190
  annofabcli/task/delete_metadata_key_of_task.py,sha256=Cjqe3fWKeRzVxxlrGyt3TS-x1riD55LnNXLIS9JPoTw,8029
191
191
  annofabcli/task/delete_tasks.py,sha256=7T5eNCMW06ABekNGLwhTitDK5qn0tiPKrEXyJXyQNvs,13098
192
192
  annofabcli/task/download_task_json.py,sha256=Ocjecmdf2WV_Sq3u1InfMLIsT3XSw0ojyJmJbhv2sgg,2803
@@ -209,8 +209,8 @@ annofabcli/task_history_event/download_task_history_event_json.py,sha256=hQLVbQ0
209
209
  annofabcli/task_history_event/list_all_task_history_event.py,sha256=EeKMyPUxGwYCFtWQHHW954ZserGm8lUqrwNnV1iX9X4,6830
210
210
  annofabcli/task_history_event/list_worktime.py,sha256=Y7Pu5DP7scPf7HPt6CTiTvB1_5_Nfi1bStUIaCpkhII,15507
211
211
  annofabcli/task_history_event/subcommand_task_history_event.py,sha256=mJVJoT4RXk4HWnY7-Nrsl4If-gtaIIEXd2z7eFZwM2I,1260
212
- annofabcli-1.106.1.dist-info/METADATA,sha256=Yn9OyrfluKXXvCiFDNavFc3UnA3wnd6i1gYTRI43V0M,5286
213
- annofabcli-1.106.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
214
- annofabcli-1.106.1.dist-info/entry_points.txt,sha256=C2uSUc-kkLJpoK_mDL5FEMAdorLEMPfwSf8VBMYnIFM,56
215
- annofabcli-1.106.1.dist-info/licenses/LICENSE,sha256=pcqWYfxFtxBzhvKp3x9MXNM4xciGb2eFewaRhXUNHlo,1081
216
- annofabcli-1.106.1.dist-info/RECORD,,
212
+ annofabcli-1.106.2.dist-info/METADATA,sha256=8kDxW3p5iajthMP9TJNcPUUEhZMOK1HCqPC83tRHcqU,5286
213
+ annofabcli-1.106.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
214
+ annofabcli-1.106.2.dist-info/entry_points.txt,sha256=C2uSUc-kkLJpoK_mDL5FEMAdorLEMPfwSf8VBMYnIFM,56
215
+ annofabcli-1.106.2.dist-info/licenses/LICENSE,sha256=pcqWYfxFtxBzhvKp3x9MXNM4xciGb2eFewaRhXUNHlo,1081
216
+ annofabcli-1.106.2.dist-info/RECORD,,