annofabcli 1.111.2__py3-none-any.whl → 1.113.0__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.
- annofabcli/__main__.py +1 -2
- annofabcli/annotation/annotation_query.py +10 -10
- annofabcli/annotation/change_annotation_attributes.py +10 -10
- annofabcli/annotation/change_annotation_attributes_per_annotation.py +4 -5
- annofabcli/annotation/change_annotation_properties.py +14 -14
- annofabcli/annotation/copy_annotation.py +6 -6
- annofabcli/annotation/create_classification_annotation.py +7 -7
- annofabcli/annotation/delete_annotation.py +9 -9
- annofabcli/annotation/download_annotation_zip.py +1 -3
- annofabcli/annotation/dump_annotation.py +8 -8
- annofabcli/annotation/import_annotation.py +13 -13
- annofabcli/annotation/list_annotation.py +9 -9
- annofabcli/annotation/list_annotation_count.py +2 -3
- annofabcli/annotation/merge_segmentation.py +6 -6
- annofabcli/annotation/remove_segmentation_overlap.py +5 -5
- annofabcli/annotation/restore_annotation.py +7 -7
- annofabcli/annotation/subcommand_annotation.py +1 -2
- annofabcli/annotation_specs/add_attribute_restriction.py +4 -5
- annofabcli/annotation_specs/attribute_restriction.py +8 -8
- annofabcli/annotation_specs/export_annotation_specs.py +4 -5
- annofabcli/annotation_specs/get_annotation_specs_with_attribute_id_replaced.py +3 -4
- annofabcli/annotation_specs/get_annotation_specs_with_choice_id_replaced.py +3 -4
- annofabcli/annotation_specs/get_annotation_specs_with_label_id_replaced.py +3 -4
- annofabcli/annotation_specs/list_annotation_specs_attribute.py +9 -10
- annofabcli/annotation_specs/list_annotation_specs_choice.py +9 -10
- annofabcli/annotation_specs/list_annotation_specs_history.py +3 -3
- annofabcli/annotation_specs/list_annotation_specs_label.py +8 -9
- annofabcli/annotation_specs/list_annotation_specs_label_attribute.py +10 -11
- annofabcli/annotation_specs/list_attribute_restriction.py +2 -4
- annofabcli/annotation_specs/list_label_color.py +2 -3
- annofabcli/annotation_specs/put_label_color.py +3 -4
- annofabcli/annotation_specs/subcommand_annotation_specs.py +1 -3
- annofabcli/annotation_zip/list_annotation_3d_bounding_box.py +365 -0
- annofabcli/annotation_zip/list_annotation_bounding_box_2d.py +37 -38
- annofabcli/annotation_zip/list_polygon_annotation.py +390 -0
- annofabcli/annotation_zip/list_polyline_annotation.py +402 -0
- annofabcli/annotation_zip/list_range_annotation.py +25 -15
- annofabcli/annotation_zip/list_single_point_annotation.py +25 -34
- annofabcli/annotation_zip/subcommand_annotation_zip.py +7 -2
- annofabcli/annotation_zip/validate_annotation.py +8 -7
- annofabcli/comment/delete_comment.py +4 -6
- annofabcli/comment/download_comment_json.py +4 -6
- annofabcli/comment/list_all_comment.py +5 -6
- annofabcli/comment/list_comment.py +3 -4
- annofabcli/comment/put_comment.py +9 -10
- annofabcli/comment/put_comment_simply.py +5 -6
- annofabcli/comment/put_inspection_comment.py +1 -3
- annofabcli/comment/put_inspection_comment_simply.py +1 -3
- annofabcli/comment/put_onhold_comment.py +1 -3
- annofabcli/comment/put_onhold_comment_simply.py +1 -3
- annofabcli/comment/subcommand_comment.py +1 -3
- annofabcli/common/bokeh.py +4 -4
- annofabcli/common/cli.py +18 -17
- annofabcli/common/download.py +28 -29
- annofabcli/common/facade.py +37 -38
- annofabcli/common/image.py +14 -14
- annofabcli/common/utils.py +8 -8
- annofabcli/common/visualize.py +13 -13
- annofabcli/experimental/list_out_of_range_annotation_for_movie.py +3 -4
- annofabcli/experimental/subcommand_experimental.py +1 -3
- annofabcli/filesystem/draw_annotation.py +27 -27
- annofabcli/filesystem/filter_annotation.py +9 -10
- annofabcli/filesystem/mask_user_info.py +15 -15
- annofabcli/filesystem/merge_annotation.py +9 -9
- annofabcli/filesystem/subcommand_filesystem.py +1 -3
- annofabcli/input_data/copy_input_data.py +8 -9
- annofabcli/input_data/delete_input_data.py +3 -3
- annofabcli/input_data/delete_metadata_key_of_input_data.py +3 -5
- annofabcli/input_data/download_input_data_json.py +4 -6
- annofabcli/input_data/list_all_input_data.py +9 -9
- annofabcli/input_data/list_all_input_data_merged_task.py +5 -5
- annofabcli/input_data/list_input_data.py +5 -5
- annofabcli/input_data/put_input_data.py +6 -6
- annofabcli/input_data/put_input_data_with_zip.py +3 -4
- annofabcli/input_data/subcommand_input_data.py +1 -3
- annofabcli/input_data/update_input_data.py +6 -8
- annofabcli/input_data/update_metadata_of_input_data.py +3 -5
- annofabcli/instruction/copy_instruction.py +5 -6
- annofabcli/instruction/download_instruction.py +5 -6
- annofabcli/instruction/list_instruction_history.py +3 -3
- annofabcli/instruction/subcommand_instruction.py +1 -3
- annofabcli/instruction/upload_instruction.py +3 -4
- annofabcli/job/delete_job.py +2 -3
- annofabcli/job/list_job.py +5 -5
- annofabcli/job/list_last_job.py +4 -4
- annofabcli/job/subcommand_job.py +1 -3
- annofabcli/job/wait_job.py +4 -5
- annofabcli/my_account/get_my_account.py +2 -3
- annofabcli/my_account/subcommand_my_account.py +1 -3
- annofabcli/organization/list_organization.py +2 -3
- annofabcli/organization/subcommand_organization.py +1 -3
- annofabcli/organization_member/change_organization_member.py +3 -4
- annofabcli/organization_member/delete_organization_member.py +3 -4
- annofabcli/organization_member/invite_organization_member.py +1 -3
- annofabcli/organization_member/list_organization_member.py +3 -3
- annofabcli/organization_member/subcommand_organization_member.py +1 -3
- annofabcli/project/change_organization_of_project.py +4 -4
- annofabcli/project/change_project_status.py +4 -4
- annofabcli/project/copy_project.py +5 -5
- annofabcli/project/create_project.py +8 -8
- annofabcli/project/diff_projects.py +4 -5
- annofabcli/project/list_project.py +5 -5
- annofabcli/project/put_project.py +2 -3
- annofabcli/project/subcommand_project.py +1 -2
- annofabcli/project/update_configuration.py +4 -4
- annofabcli/project/update_project.py +6 -8
- annofabcli/project_member/change_project_members.py +8 -8
- annofabcli/project_member/copy_project_members.py +4 -4
- annofabcli/project_member/drop_project_members.py +2 -3
- annofabcli/project_member/invite_project_members.py +1 -3
- annofabcli/project_member/list_users.py +2 -3
- annofabcli/project_member/put_project_members.py +6 -6
- annofabcli/project_member/subcommand_project_member.py +1 -3
- annofabcli/stat_visualization/mask_visualization_dir.py +8 -9
- annofabcli/stat_visualization/merge_visualization_dir.py +6 -7
- annofabcli/stat_visualization/subcommand_stat_visualization.py +1 -2
- annofabcli/stat_visualization/summarize_whole_performance_csv.py +1 -2
- annofabcli/stat_visualization/write_graph.py +2 -3
- annofabcli/stat_visualization/write_performance_rating_csv.py +20 -27
- annofabcli/statistics/histogram.py +5 -6
- annofabcli/statistics/linegraph.py +13 -14
- annofabcli/statistics/list_annotation_area.py +38 -13
- annofabcli/statistics/list_annotation_attribute.py +9 -10
- annofabcli/statistics/list_annotation_attribute_filled_count.py +30 -31
- annofabcli/statistics/list_annotation_count.py +57 -58
- annofabcli/statistics/list_annotation_duration.py +33 -34
- annofabcli/statistics/list_video_duration.py +4 -5
- annofabcli/statistics/list_worktime.py +4 -4
- annofabcli/statistics/scatter.py +9 -8
- annofabcli/statistics/subcommand_statistics.py +1 -4
- annofabcli/statistics/summarize_task_count.py +4 -6
- annofabcli/statistics/summarize_task_count_by_task_id_group.py +2 -4
- annofabcli/statistics/summarize_task_count_by_user.py +1 -3
- annofabcli/statistics/visualization/dataframe/annotation_count.py +5 -4
- annofabcli/statistics/visualization/dataframe/annotation_duration.py +2 -3
- annofabcli/statistics/visualization/dataframe/cumulative_productivity.py +15 -17
- annofabcli/statistics/visualization/dataframe/productivity_per_date.py +17 -19
- annofabcli/statistics/visualization/dataframe/project_performance.py +3 -12
- annofabcli/statistics/visualization/dataframe/task.py +11 -12
- annofabcli/statistics/visualization/dataframe/task_worktime_by_phase_user.py +9 -10
- annofabcli/statistics/visualization/dataframe/user_performance.py +21 -19
- annofabcli/statistics/visualization/dataframe/whole_performance.py +3 -4
- annofabcli/statistics/visualization/dataframe/whole_productivity_per_date.py +12 -14
- annofabcli/statistics/visualization/dataframe/worktime_per_date.py +11 -13
- annofabcli/statistics/visualization/filtering_query.py +7 -7
- annofabcli/statistics/visualization/project_dir.py +27 -14
- annofabcli/statistics/visualize_annotation_count.py +22 -23
- annofabcli/statistics/visualize_annotation_duration.py +21 -22
- annofabcli/statistics/visualize_statistics.py +36 -33
- annofabcli/statistics/visualize_video_duration.py +18 -20
- annofabcli/supplementary/delete_supplementary_data.py +5 -5
- annofabcli/supplementary/list_supplementary_data.py +4 -4
- annofabcli/supplementary/put_supplementary_data.py +9 -9
- annofabcli/supplementary/subcommand_supplementary.py +1 -3
- annofabcli/task/cancel_acceptance.py +16 -17
- annofabcli/task/change_operator.py +10 -12
- annofabcli/task/change_status_to_break.py +7 -9
- annofabcli/task/change_status_to_on_hold.py +10 -12
- annofabcli/task/complete_tasks.py +17 -18
- annofabcli/task/copy_tasks.py +3 -5
- annofabcli/task/delete_metadata_key_of_task.py +4 -6
- annofabcli/task/delete_tasks.py +7 -7
- annofabcli/task/download_task_json.py +4 -6
- annofabcli/task/list_all_tasks.py +8 -8
- annofabcli/task/list_all_tasks_added_task_history.py +14 -13
- annofabcli/task/list_tasks.py +7 -7
- annofabcli/task/list_tasks_added_task_history.py +10 -10
- annofabcli/task/put_tasks.py +5 -6
- annofabcli/task/put_tasks_by_count.py +2 -3
- annofabcli/task/reject_tasks.py +18 -20
- annofabcli/task/subcommand_task.py +1 -3
- annofabcli/task/update_metadata_of_task.py +5 -6
- annofabcli/task_history/download_task_history_json.py +4 -6
- annofabcli/task_history/list_all_task_history.py +6 -7
- annofabcli/task_history/list_task_history.py +4 -5
- annofabcli/task_history/subcommand_task_history.py +1 -3
- annofabcli/task_history_event/download_task_history_event_json.py +4 -6
- annofabcli/task_history_event/list_all_task_history_event.py +7 -7
- annofabcli/task_history_event/list_worktime.py +17 -16
- annofabcli/task_history_event/subcommand_task_history_event.py +1 -2
- {annofabcli-1.111.2.dist-info → annofabcli-1.113.0.dist-info}/METADATA +9 -15
- annofabcli-1.113.0.dist-info/RECORD +231 -0
- {annofabcli-1.111.2.dist-info → annofabcli-1.113.0.dist-info}/WHEEL +1 -1
- annofabcli-1.111.2.dist-info/RECORD +0 -228
- {annofabcli-1.111.2.dist-info → annofabcli-1.113.0.dist-info}/entry_points.txt +0 -0
- {annofabcli-1.111.2.dist-info → annofabcli-1.113.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -3,13 +3,12 @@ from __future__ import annotations
|
|
|
3
3
|
import argparse
|
|
4
4
|
import logging
|
|
5
5
|
from collections.abc import Collection
|
|
6
|
-
from typing import Any
|
|
6
|
+
from typing import Any
|
|
7
7
|
|
|
8
8
|
import annofabapi
|
|
9
9
|
import more_itertools
|
|
10
10
|
from annofabapi.models import OrganizationMemberRole
|
|
11
11
|
|
|
12
|
-
import annofabcli
|
|
13
12
|
import annofabcli.common.cli
|
|
14
13
|
from annofabcli.common.cli import (
|
|
15
14
|
CommandLine,
|
|
@@ -33,7 +32,7 @@ class ChangeOrganizationMemberMain(CommandLineWithConfirm):
|
|
|
33
32
|
super().__init__(all_yes)
|
|
34
33
|
|
|
35
34
|
@staticmethod
|
|
36
|
-
def get_member(organization_member_list: list[dict[str, Any]], user_id: str) ->
|
|
35
|
+
def get_member(organization_member_list: list[dict[str, Any]], user_id: str) -> dict[str, Any] | None:
|
|
37
36
|
return more_itertools.first_true(organization_member_list, pred=lambda e: e["user_id"] == user_id)
|
|
38
37
|
|
|
39
38
|
def main(self, organization_name: str, user_ids: Collection[str], role: str) -> None:
|
|
@@ -107,7 +106,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
107
106
|
parser.set_defaults(subcommand_func=main)
|
|
108
107
|
|
|
109
108
|
|
|
110
|
-
def add_parser(subparsers:
|
|
109
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
111
110
|
# 2022/01時点でロールしか変更できないのに、change_roleという名前でなくchangeという名前にしたのは、将来的にロール以外も変更できるようにするため
|
|
112
111
|
subcommand_name = "change"
|
|
113
112
|
subcommand_help = "組織メンバの情報(ロールなど)を変更します。"
|
|
@@ -3,13 +3,12 @@ from __future__ import annotations
|
|
|
3
3
|
import argparse
|
|
4
4
|
import logging
|
|
5
5
|
from collections.abc import Collection
|
|
6
|
-
from typing import Any
|
|
6
|
+
from typing import Any
|
|
7
7
|
|
|
8
8
|
import annofabapi
|
|
9
9
|
import more_itertools
|
|
10
10
|
from annofabapi.models import OrganizationMemberRole
|
|
11
11
|
|
|
12
|
-
import annofabcli
|
|
13
12
|
import annofabcli.common.cli
|
|
14
13
|
from annofabcli.common.cli import (
|
|
15
14
|
CommandLine,
|
|
@@ -33,7 +32,7 @@ class DeleteOrganizationMemberMain(CommandLineWithConfirm):
|
|
|
33
32
|
super().__init__(all_yes)
|
|
34
33
|
|
|
35
34
|
@staticmethod
|
|
36
|
-
def get_member(organization_member_list: list[dict[str, Any]], user_id: str) ->
|
|
35
|
+
def get_member(organization_member_list: list[dict[str, Any]], user_id: str) -> dict[str, Any] | None:
|
|
37
36
|
return more_itertools.first_true(organization_member_list, pred=lambda e: e["user_id"] == user_id)
|
|
38
37
|
|
|
39
38
|
def delete_organization_members_from_organization(self, organization_name: str, user_ids: Collection[str]) -> None:
|
|
@@ -113,7 +112,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
113
112
|
parser.set_defaults(subcommand_func=main)
|
|
114
113
|
|
|
115
114
|
|
|
116
|
-
def add_parser(subparsers:
|
|
115
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
117
116
|
subcommand_name = "delete"
|
|
118
117
|
subcommand_help = "組織からメンバーを脱退させます。"
|
|
119
118
|
epilog = "組織オーナまたは組織管理者ロールを持つユーザで実行してください。"
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import argparse
|
|
2
2
|
import logging
|
|
3
3
|
from collections.abc import Collection
|
|
4
|
-
from typing import Optional
|
|
5
4
|
|
|
6
5
|
import annofabapi
|
|
7
6
|
from annofabapi.models import OrganizationMemberRole
|
|
8
7
|
|
|
9
|
-
import annofabcli
|
|
10
8
|
import annofabcli.common.cli
|
|
11
9
|
from annofabcli.common.cli import (
|
|
12
10
|
CommandLine,
|
|
@@ -108,7 +106,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
108
106
|
parser.set_defaults(subcommand_func=main)
|
|
109
107
|
|
|
110
108
|
|
|
111
|
-
def add_parser(subparsers:
|
|
109
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
112
110
|
subcommand_name = "invite"
|
|
113
111
|
subcommand_help = "組織にメンバーを招待します。"
|
|
114
112
|
epilog = "組織オーナまたは組織管理者ロールを持つユーザで実行してください。"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import argparse
|
|
2
2
|
import logging
|
|
3
|
-
from typing import Any
|
|
3
|
+
from typing import Any
|
|
4
4
|
|
|
5
5
|
import pandas
|
|
6
6
|
import requests
|
|
7
7
|
|
|
8
|
-
import annofabcli
|
|
8
|
+
import annofabcli.common.cli
|
|
9
9
|
from annofabcli.common.cli import ArgumentParser, CommandLine, build_annofabapi_resource_and_login
|
|
10
10
|
from annofabcli.common.enums import FormatArgument
|
|
11
11
|
from annofabcli.common.facade import AnnofabApiFacade
|
|
@@ -87,7 +87,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
87
87
|
parser.set_defaults(subcommand_func=main)
|
|
88
88
|
|
|
89
89
|
|
|
90
|
-
def add_parser(subparsers:
|
|
90
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
91
91
|
subcommand_name = "list"
|
|
92
92
|
subcommand_help = "組織メンバ一覧を出力します。"
|
|
93
93
|
description = "組織メンバ一覧を出力します。"
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import argparse
|
|
2
|
-
from typing import Optional
|
|
3
2
|
|
|
4
|
-
import annofabcli
|
|
5
3
|
import annofabcli.common.cli
|
|
6
4
|
import annofabcli.organization_member.change_organization_member
|
|
7
5
|
import annofabcli.organization_member.delete_organization_member
|
|
@@ -19,7 +17,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
19
17
|
annofabcli.organization_member.list_organization_member.add_parser(subparsers)
|
|
20
18
|
|
|
21
19
|
|
|
22
|
-
def add_parser(subparsers:
|
|
20
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
23
21
|
subcommand_name = "organization_member"
|
|
24
22
|
subcommand_help = "組織メンバ関係のサブコマンド"
|
|
25
23
|
description = "組織メンバ関係のサブコマンド"
|
|
@@ -10,7 +10,7 @@ import more_itertools
|
|
|
10
10
|
import requests
|
|
11
11
|
from annofabapi.models import JobStatus, OrganizationMemberRole, ProjectJobType
|
|
12
12
|
|
|
13
|
-
import annofabcli
|
|
13
|
+
import annofabcli.common.cli
|
|
14
14
|
from annofabcli.common.cli import (
|
|
15
15
|
CommandLine,
|
|
16
16
|
CommandLineWithConfirm,
|
|
@@ -76,7 +76,7 @@ class ChangeProjectOrganizationMain(CommandLineWithConfirm):
|
|
|
76
76
|
指定したジョブ(job_idがNoneの場合は現在進行中のジョブ)が存在しない場合は、Noneを返す。
|
|
77
77
|
"""
|
|
78
78
|
|
|
79
|
-
def get_job_from_job_id(arg_job_id: str) ->
|
|
79
|
+
def get_job_from_job_id(arg_job_id: str) -> dict[str, Any] | None:
|
|
80
80
|
content, _ = self.service.api.get_project_job(project_id, query_params={"type": job_type.value})
|
|
81
81
|
job_list = content["list"]
|
|
82
82
|
return more_itertools.first_true(job_list, pred=lambda e: e["job_id"] == arg_job_id)
|
|
@@ -134,7 +134,7 @@ class ChangeProjectOrganizationMain(CommandLineWithConfirm):
|
|
|
134
134
|
)
|
|
135
135
|
return JobStatus.PROGRESS
|
|
136
136
|
|
|
137
|
-
def change_organization_for_project(self, project_id: str, organization_name: str) ->
|
|
137
|
+
def change_organization_for_project(self, project_id: str, organization_name: str) -> dict[str, Any] | None:
|
|
138
138
|
project = self.service.wrapper.get_project_or_none(project_id)
|
|
139
139
|
if project is None:
|
|
140
140
|
logger.warning(f"project_id='{project_id}'のプロジェクトは存在しないので、スキップします。")
|
|
@@ -247,7 +247,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
247
247
|
parser.set_defaults(subcommand_func=main)
|
|
248
248
|
|
|
249
249
|
|
|
250
|
-
def add_parser(subparsers:
|
|
250
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
251
251
|
subcommand_name = "change_organization"
|
|
252
252
|
subcommand_help = "プロジェクトの所属する組織を変更します。"
|
|
253
253
|
epilog = "プロジェクトのオーナロール、変更先の組織の管理者またはオーナーロールを持つユーザで実行してください。"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import argparse
|
|
2
2
|
import logging
|
|
3
|
-
from typing import Any
|
|
3
|
+
from typing import Any
|
|
4
4
|
|
|
5
5
|
import annofabapi
|
|
6
6
|
import pandas
|
|
@@ -8,7 +8,7 @@ import requests
|
|
|
8
8
|
from annofabapi.models import OrganizationMember, Project, ProjectMemberRole, ProjectStatus
|
|
9
9
|
from more_itertools import first_true
|
|
10
10
|
|
|
11
|
-
import annofabcli
|
|
11
|
+
import annofabcli.common.cli
|
|
12
12
|
from annofabcli.common.cli import CommandLine, build_annofabapi_resource_and_login
|
|
13
13
|
from annofabcli.common.facade import AnnofabApiFacade
|
|
14
14
|
|
|
@@ -38,7 +38,7 @@ class ChanegProjectStatusMain:
|
|
|
38
38
|
self.facade = AnnofabApiFacade(service)
|
|
39
39
|
|
|
40
40
|
@staticmethod
|
|
41
|
-
def get_account_id_from_user_id(organization_member_list: list[OrganizationMember], user_id: str) ->
|
|
41
|
+
def get_account_id_from_user_id(organization_member_list: list[OrganizationMember], user_id: str) -> str | None:
|
|
42
42
|
member = first_true(organization_member_list, pred=lambda e: e["user_id"] == user_id)
|
|
43
43
|
if member is not None:
|
|
44
44
|
return member["account_id"]
|
|
@@ -193,7 +193,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
193
193
|
parser.set_defaults(subcommand_func=main)
|
|
194
194
|
|
|
195
195
|
|
|
196
|
-
def add_parser(subparsers:
|
|
196
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
197
197
|
subcommand_name = "change_status"
|
|
198
198
|
subcommand_help = "プロジェクトのステータスを変更します。"
|
|
199
199
|
description = "プロジェクトのステータスを変更します。"
|
|
@@ -5,11 +5,11 @@ import logging
|
|
|
5
5
|
import uuid
|
|
6
6
|
from collections.abc import Collection
|
|
7
7
|
from enum import Enum
|
|
8
|
-
from typing import Any
|
|
8
|
+
from typing import Any
|
|
9
9
|
|
|
10
10
|
from annofabapi.models import OrganizationMemberRole, ProjectJobType, ProjectMemberRole
|
|
11
11
|
|
|
12
|
-
import annofabcli
|
|
12
|
+
import annofabcli.common.cli
|
|
13
13
|
from annofabcli.common.cli import ArgumentParser, CommandLine, build_annofabapi_resource_and_login
|
|
14
14
|
from annofabcli.common.dataclasses import WaitOptions
|
|
15
15
|
from annofabcli.common.facade import AnnofabApiFacade
|
|
@@ -58,8 +58,8 @@ class CopyProject(CommandLine):
|
|
|
58
58
|
src_project_id: str,
|
|
59
59
|
dest_project_id: str,
|
|
60
60
|
dest_title: str,
|
|
61
|
-
dest_overview:
|
|
62
|
-
copied_targets:
|
|
61
|
+
dest_overview: str | None = None,
|
|
62
|
+
copied_targets: Collection[CopiedTarget] | None = None,
|
|
63
63
|
) -> None:
|
|
64
64
|
"""
|
|
65
65
|
プロジェクトメンバを、別のプロジェクトにコピーする。
|
|
@@ -150,7 +150,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
150
150
|
parser.set_defaults(subcommand_func=main)
|
|
151
151
|
|
|
152
152
|
|
|
153
|
-
def add_parser(subparsers:
|
|
153
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
154
154
|
subcommand_name = "copy"
|
|
155
155
|
subcommand_help = "プロジェクトをコピーします。"
|
|
156
156
|
description = "プロジェクトをコピーします。'プロジェクト設定', 'プロジェクトメンバー', 'アノテーション仕様'は必ずコピーされます。"
|
|
@@ -5,12 +5,12 @@ import logging
|
|
|
5
5
|
import sys
|
|
6
6
|
import uuid
|
|
7
7
|
from enum import Enum
|
|
8
|
-
from typing import Any
|
|
8
|
+
from typing import Any
|
|
9
9
|
|
|
10
10
|
from annofabapi.models import InputDataType
|
|
11
11
|
from annofabapi.plugin import EditorPluginId, ExtendSpecsPluginId
|
|
12
12
|
|
|
13
|
-
import annofabcli
|
|
13
|
+
import annofabcli.common.cli
|
|
14
14
|
from annofabcli.common.cli import (
|
|
15
15
|
COMMAND_LINE_ERROR_STATUS_CODE,
|
|
16
16
|
CommandLine,
|
|
@@ -38,11 +38,11 @@ class CreateProject(CommandLine):
|
|
|
38
38
|
title: str,
|
|
39
39
|
input_data_type: InputDataType,
|
|
40
40
|
*,
|
|
41
|
-
project_id:
|
|
42
|
-
overview:
|
|
43
|
-
editor_plugin_id:
|
|
44
|
-
custom_project_type:
|
|
45
|
-
configuration:
|
|
41
|
+
project_id: str | None,
|
|
42
|
+
overview: str | None,
|
|
43
|
+
editor_plugin_id: str | None,
|
|
44
|
+
custom_project_type: CustomProjectType | None,
|
|
45
|
+
configuration: dict[str, Any] | None,
|
|
46
46
|
):
|
|
47
47
|
new_project_id = project_id if project_id is not None else str(uuid.uuid4())
|
|
48
48
|
if configuration is None:
|
|
@@ -141,7 +141,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
141
141
|
parser.set_defaults(subcommand_func=main)
|
|
142
142
|
|
|
143
143
|
|
|
144
|
-
def add_parser(subparsers:
|
|
144
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
145
145
|
subcommand_name = "create"
|
|
146
146
|
subcommand_help = "プロジェクトを作成します。"
|
|
147
147
|
epilog = "組織管理者、組織オーナを持つユーザで実行してください。"
|
|
@@ -8,14 +8,13 @@ import functools
|
|
|
8
8
|
import logging
|
|
9
9
|
import pprint
|
|
10
10
|
from enum import Enum
|
|
11
|
-
from typing import Any
|
|
11
|
+
from typing import Any
|
|
12
12
|
|
|
13
13
|
import annofabapi
|
|
14
14
|
import dictdiffer
|
|
15
15
|
import more_itertools
|
|
16
16
|
from annofabapi.models import ProjectMemberRole
|
|
17
17
|
|
|
18
|
-
import annofabcli
|
|
19
18
|
import annofabcli.common.cli
|
|
20
19
|
from annofabcli.common.cli import CommandLine, build_annofabapi_resource_and_login
|
|
21
20
|
from annofabcli.common.facade import AnnofabApiFacade, convert_annotation_specs_labels_v2_to_v1
|
|
@@ -110,7 +109,7 @@ class DiffProjects(CommandLine):
|
|
|
110
109
|
return True, diff_message
|
|
111
110
|
|
|
112
111
|
is_different = False
|
|
113
|
-
for member1, member2 in zip(sorted_members1, sorted_members2):
|
|
112
|
+
for member1, member2 in zip(sorted_members1, sorted_members2, strict=False):
|
|
114
113
|
ignored_key = {"updated_datetime", "created_datetime", "project_id"}
|
|
115
114
|
diff_result = list(dictdiffer.diff(member1, member2, ignore=ignored_key))
|
|
116
115
|
if len(diff_result) > 0:
|
|
@@ -245,7 +244,7 @@ class DiffProjects(CommandLine):
|
|
|
245
244
|
return True, diff_message
|
|
246
245
|
|
|
247
246
|
is_different = False
|
|
248
|
-
for phrase1, phrase2 in zip(sorted_inspection_phrases1, sorted_inspection_phrases2):
|
|
247
|
+
for phrase1, phrase2 in zip(sorted_inspection_phrases1, sorted_inspection_phrases2, strict=False):
|
|
249
248
|
diff_result = list(dictdiffer.diff(phrase1, phrase2))
|
|
250
249
|
if len(diff_result) > 0:
|
|
251
250
|
is_different = True
|
|
@@ -397,7 +396,7 @@ def main(args: argparse.Namespace) -> None:
|
|
|
397
396
|
DiffProjects(service, facade, args).main()
|
|
398
397
|
|
|
399
398
|
|
|
400
|
-
def add_parser(subparsers:
|
|
399
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
401
400
|
subcommand_name = "diff"
|
|
402
401
|
subcommand_help = "プロジェクト間の差分を表示する。"
|
|
403
402
|
description = "プロジェクト間の差分を表示する。" + "ただし、Annofabで生成されるIDや、変化する日時などは比較しない。"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import argparse
|
|
2
2
|
import logging
|
|
3
3
|
import sys
|
|
4
|
-
from typing import Any
|
|
4
|
+
from typing import Any
|
|
5
5
|
|
|
6
6
|
import annofabapi
|
|
7
7
|
import pandas
|
|
8
8
|
from annofabapi.models import OrganizationMember, Project
|
|
9
9
|
from more_itertools import first_true
|
|
10
10
|
|
|
11
|
-
import annofabcli
|
|
11
|
+
import annofabcli.common.cli
|
|
12
12
|
from annofabcli.common.cli import (
|
|
13
13
|
COMMAND_LINE_ERROR_STATUS_CODE,
|
|
14
14
|
ArgumentParser,
|
|
@@ -45,7 +45,7 @@ class ListProjectMain:
|
|
|
45
45
|
self.facade = AnnofabApiFacade(service)
|
|
46
46
|
|
|
47
47
|
@staticmethod
|
|
48
|
-
def get_account_id_from_user_id(organization_member_list: list[OrganizationMember], user_id: str) ->
|
|
48
|
+
def get_account_id_from_user_id(organization_member_list: list[OrganizationMember], user_id: str) -> str | None:
|
|
49
49
|
member = first_true(organization_member_list, pred=lambda e: e["user_id"] == user_id)
|
|
50
50
|
if member is not None:
|
|
51
51
|
return member["account_id"]
|
|
@@ -116,7 +116,7 @@ class ListProjectMain:
|
|
|
116
116
|
|
|
117
117
|
return project_query
|
|
118
118
|
|
|
119
|
-
def get_project_list_from_organization(self, organization_name: str, project_query:
|
|
119
|
+
def get_project_list_from_organization(self, organization_name: str, project_query: dict[str, Any] | None = None) -> list[Project]:
|
|
120
120
|
"""
|
|
121
121
|
組織名からプロジェクト一覧を取得する。
|
|
122
122
|
"""
|
|
@@ -254,7 +254,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
254
254
|
parser.set_defaults(subcommand_func=main)
|
|
255
255
|
|
|
256
256
|
|
|
257
|
-
def add_parser(subparsers:
|
|
257
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
258
258
|
subcommand_name = "list"
|
|
259
259
|
subcommand_help = "プロジェクト一覧を出力します。"
|
|
260
260
|
description = "プロジェクト一覧を出力します。"
|
|
@@ -3,9 +3,8 @@ from __future__ import annotations
|
|
|
3
3
|
import argparse
|
|
4
4
|
import sys
|
|
5
5
|
from logging import getLogger
|
|
6
|
-
from typing import Optional
|
|
7
6
|
|
|
8
|
-
import annofabcli
|
|
7
|
+
import annofabcli.common.cli
|
|
9
8
|
from annofabcli.project import create_project
|
|
10
9
|
|
|
11
10
|
logger = getLogger(__name__)
|
|
@@ -24,7 +23,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
24
23
|
parser.set_defaults(subcommand_func=main)
|
|
25
24
|
|
|
26
25
|
|
|
27
|
-
def add_parser(subparsers:
|
|
26
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
28
27
|
subcommand_name = "put"
|
|
29
28
|
subcommand_help = "[DEPRECATED] プロジェクトを作成します。"
|
|
30
29
|
subcommand_description = subcommand_help + "\n`project put` コマンドは非推奨です。代わりに 'project create'コマンドを使用してください。`project put` コマンドは2026年01月01日以降に廃止予定です。"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import argparse
|
|
2
|
-
from typing import Optional
|
|
3
2
|
|
|
4
3
|
import annofabcli.project.change_organization_of_project
|
|
5
4
|
import annofabcli.project.change_project_status
|
|
@@ -28,7 +27,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
28
27
|
annofabcli.project.update_project.add_parser(subparsers)
|
|
29
28
|
|
|
30
29
|
|
|
31
|
-
def add_parser(subparsers:
|
|
30
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
32
31
|
subcommand_name = "project"
|
|
33
32
|
subcommand_help = "プロジェクト関係のサブコマンド"
|
|
34
33
|
description = "プロジェクト関係のサブコマンド"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import argparse
|
|
2
2
|
import copy
|
|
3
3
|
import logging
|
|
4
|
-
from typing import Any
|
|
4
|
+
from typing import Any
|
|
5
5
|
|
|
6
6
|
import annofabapi
|
|
7
7
|
|
|
8
|
-
import annofabcli
|
|
8
|
+
import annofabcli.common.cli
|
|
9
9
|
from annofabcli.common.cli import CommandLine, CommandLineWithConfirm, build_annofabapi_resource_and_login, get_json_from_args, get_list_from_args
|
|
10
10
|
from annofabcli.common.facade import AnnofabApiFacade
|
|
11
11
|
|
|
@@ -23,7 +23,7 @@ class UpdateProjectConfigurationMain(CommandLineWithConfirm):
|
|
|
23
23
|
self.facade = AnnofabApiFacade(service)
|
|
24
24
|
super().__init__(all_yes)
|
|
25
25
|
|
|
26
|
-
def update_configuration_for_project(self, project_id: str, configuration: dict[str, Any], *, project_index:
|
|
26
|
+
def update_configuration_for_project(self, project_id: str, configuration: dict[str, Any], *, project_index: int | None = None) -> bool:
|
|
27
27
|
"""
|
|
28
28
|
指定されたプロジェクトの設定を更新する。
|
|
29
29
|
|
|
@@ -141,7 +141,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
141
141
|
parser.set_defaults(subcommand_func=main)
|
|
142
142
|
|
|
143
143
|
|
|
144
|
-
def add_parser(subparsers:
|
|
144
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
145
145
|
subcommand_name = "update_configuration"
|
|
146
146
|
subcommand_help = "複数のプロジェクトの設定を一括で更新します。"
|
|
147
147
|
epilog = "プロジェクトのオーナロールを持つユーザで実行してください。"
|
|
@@ -9,13 +9,11 @@ import sys
|
|
|
9
9
|
from enum import Enum
|
|
10
10
|
from functools import partial
|
|
11
11
|
from pathlib import Path
|
|
12
|
-
from typing import Optional
|
|
13
12
|
|
|
14
13
|
import annofabapi
|
|
15
14
|
import pandas
|
|
16
15
|
from pydantic import BaseModel
|
|
17
16
|
|
|
18
|
-
import annofabcli
|
|
19
17
|
import annofabcli.common.cli
|
|
20
18
|
from annofabcli.common.cli import (
|
|
21
19
|
COMMAND_LINE_ERROR_STATUS_CODE,
|
|
@@ -48,9 +46,9 @@ class UpdatedProject(BaseModel):
|
|
|
48
46
|
|
|
49
47
|
project_id: str
|
|
50
48
|
"""更新対象のプロジェクトを表すID"""
|
|
51
|
-
title:
|
|
49
|
+
title: str | None = None
|
|
52
50
|
"""変更後のプロジェクトタイトル(指定した場合のみ更新)"""
|
|
53
|
-
overview:
|
|
51
|
+
overview: str | None = None
|
|
54
52
|
"""変更後のプロジェクト概要(指定した場合のみ更新)"""
|
|
55
53
|
|
|
56
54
|
|
|
@@ -63,9 +61,9 @@ class UpdateProjectMain(CommandLineWithConfirm):
|
|
|
63
61
|
self,
|
|
64
62
|
project_id: str,
|
|
65
63
|
*,
|
|
66
|
-
new_title:
|
|
67
|
-
new_overview:
|
|
68
|
-
project_index:
|
|
64
|
+
new_title: str | None = None,
|
|
65
|
+
new_overview: str | None = None,
|
|
66
|
+
project_index: int | None = None,
|
|
69
67
|
) -> UpdateResult:
|
|
70
68
|
"""
|
|
71
69
|
1個のプロジェクトを更新します。
|
|
@@ -289,7 +287,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
289
287
|
parser.set_defaults(subcommand_func=main)
|
|
290
288
|
|
|
291
289
|
|
|
292
|
-
def add_parser(subparsers:
|
|
290
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
293
291
|
subcommand_name = "update"
|
|
294
292
|
subcommand_help = "プロジェクトのタイトルまたは概要を更新します。"
|
|
295
293
|
epilog = "プロジェクトオーナロールを持つユーザで実行してください。"
|
|
@@ -2,12 +2,12 @@ import argparse
|
|
|
2
2
|
import logging
|
|
3
3
|
import sys
|
|
4
4
|
from collections.abc import Collection
|
|
5
|
-
from typing import Any
|
|
5
|
+
from typing import Any
|
|
6
6
|
|
|
7
7
|
import requests
|
|
8
8
|
from annofabapi.models import ProjectMember, ProjectMemberRole, ProjectMemberStatus
|
|
9
9
|
|
|
10
|
-
import annofabcli
|
|
10
|
+
import annofabcli.common.cli
|
|
11
11
|
from annofabcli.common.cli import (
|
|
12
12
|
COMMAND_LINE_ERROR_STATUS_CODE,
|
|
13
13
|
ArgumentParser,
|
|
@@ -30,8 +30,8 @@ class ChangeProjectMembers(CommandLine):
|
|
|
30
30
|
project_id: str,
|
|
31
31
|
user_id: str,
|
|
32
32
|
old_member: ProjectMember,
|
|
33
|
-
member_role:
|
|
34
|
-
member_info:
|
|
33
|
+
member_role: ProjectMemberRole | None = None,
|
|
34
|
+
member_info: dict[str, Any] | None = None,
|
|
35
35
|
) -> ProjectMember:
|
|
36
36
|
"""
|
|
37
37
|
1人のプロジェクトメンバを変更する。
|
|
@@ -73,8 +73,8 @@ class ChangeProjectMembers(CommandLine):
|
|
|
73
73
|
self,
|
|
74
74
|
project_id: str,
|
|
75
75
|
user_id_list: Collection[str],
|
|
76
|
-
member_role:
|
|
77
|
-
member_info:
|
|
76
|
+
member_role: ProjectMemberRole | None = None,
|
|
77
|
+
member_info: dict[str, Any] | None = None,
|
|
78
78
|
):
|
|
79
79
|
"""
|
|
80
80
|
プロジェクトメンバのメンバ情報を更新する。
|
|
@@ -126,7 +126,7 @@ class ChangeProjectMembers(CommandLine):
|
|
|
126
126
|
return [e["user_id"] for e in member_list if e["user_id"] != self.service.api.login_user_id]
|
|
127
127
|
|
|
128
128
|
@staticmethod
|
|
129
|
-
def validate(args: argparse.Namespace, member_info:
|
|
129
|
+
def validate(args: argparse.Namespace, member_info: dict[str, Any] | None = None) -> bool:
|
|
130
130
|
COMMON_MESSAGE = "annofabcli project_member change: error:" # noqa: N806
|
|
131
131
|
if args.role is None and args.member_info is None:
|
|
132
132
|
print(f"{COMMON_MESSAGE} argument `--role`または`--member_info`のどちらかは、必ず指定してください。", file=sys.stderr) # noqa: T201
|
|
@@ -202,7 +202,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
202
202
|
parser.set_defaults(subcommand_func=main)
|
|
203
203
|
|
|
204
204
|
|
|
205
|
-
def add_parser(subparsers:
|
|
205
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
206
206
|
subcommand_name = "change"
|
|
207
207
|
subcommand_help = "プロジェクトメンバを変更します。"
|
|
208
208
|
description = "複数のプロジェクトメンバに対して、メンバ情報を変更します。ただし、自分自身は変更できません。"
|
|
@@ -2,12 +2,12 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import argparse
|
|
4
4
|
import logging
|
|
5
|
-
from typing import Any
|
|
5
|
+
from typing import Any
|
|
6
6
|
|
|
7
7
|
import annofabapi
|
|
8
8
|
from annofabapi.models import OrganizationMember, ProjectMember, ProjectMemberRole
|
|
9
9
|
|
|
10
|
-
import annofabcli
|
|
10
|
+
import annofabcli.common.cli
|
|
11
11
|
from annofabcli.common.cli import CommandLine, build_annofabapi_resource_and_login
|
|
12
12
|
from annofabcli.common.facade import AnnofabApiFacade
|
|
13
13
|
|
|
@@ -47,7 +47,7 @@ class CopyProjectMembers(CommandLine):
|
|
|
47
47
|
return self.service.wrapper.get_all_organization_members(organization_name)
|
|
48
48
|
|
|
49
49
|
@staticmethod
|
|
50
|
-
def find_member(members: list[dict[str, Any]], account_id: str) ->
|
|
50
|
+
def find_member(members: list[dict[str, Any]], account_id: str) -> dict[str, Any] | None:
|
|
51
51
|
for m in members:
|
|
52
52
|
if m["account_id"] == account_id:
|
|
53
53
|
return m
|
|
@@ -175,7 +175,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
175
175
|
parser.set_defaults(subcommand_func=main)
|
|
176
176
|
|
|
177
177
|
|
|
178
|
-
def add_parser(subparsers:
|
|
178
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
179
179
|
subcommand_name = "copy"
|
|
180
180
|
subcommand_help = "プロジェクトメンバをコピーする。"
|
|
181
181
|
description = "プロジェクトメンバをコピーする。"
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import argparse
|
|
2
2
|
import logging
|
|
3
|
-
from typing import Optional
|
|
4
3
|
|
|
5
4
|
import annofabapi
|
|
6
5
|
import requests
|
|
7
6
|
from annofabapi.models import ProjectMemberStatus
|
|
8
7
|
from more_itertools import first_true
|
|
9
8
|
|
|
10
|
-
import annofabcli
|
|
9
|
+
import annofabcli.common.cli
|
|
11
10
|
from annofabcli.common.cli import CommandLine, build_annofabapi_resource_and_login
|
|
12
11
|
from annofabcli.common.facade import AnnofabApiFacade
|
|
13
12
|
|
|
@@ -125,7 +124,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
125
124
|
parser.set_defaults(subcommand_func=main)
|
|
126
125
|
|
|
127
126
|
|
|
128
|
-
def add_parser(subparsers:
|
|
127
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
129
128
|
subcommand_name = "delete"
|
|
130
129
|
subcommand_help = "複数のプロジェクトから、ユーザを脱退させます。"
|
|
131
130
|
description = "複数のプロジェクトから、ユーザを脱退させます。"
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import argparse
|
|
2
2
|
import logging
|
|
3
|
-
from typing import Optional
|
|
4
3
|
|
|
5
4
|
import annofabapi
|
|
6
5
|
import requests
|
|
7
6
|
from annofabapi.models import ProjectMemberRole, ProjectMemberStatus
|
|
8
7
|
from more_itertools import first_true
|
|
9
8
|
|
|
10
|
-
import annofabcli
|
|
11
9
|
import annofabcli.common.cli
|
|
12
10
|
from annofabcli.common.cli import CommandLine, build_annofabapi_resource_and_login
|
|
13
11
|
from annofabcli.common.facade import AnnofabApiFacade
|
|
@@ -136,7 +134,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
136
134
|
parser.set_defaults(subcommand_func=main)
|
|
137
135
|
|
|
138
136
|
|
|
139
|
-
def add_parser(subparsers:
|
|
137
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
140
138
|
subcommand_name = "invite"
|
|
141
139
|
subcommand_help = "複数のプロジェクトに、ユーザを招待します。"
|
|
142
140
|
description = "複数のプロジェクトに、ユーザを招待します。"
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import argparse
|
|
2
2
|
import logging
|
|
3
|
-
from typing import Optional
|
|
4
3
|
|
|
5
4
|
import pandas
|
|
6
5
|
import requests
|
|
7
6
|
from annofabapi.models import ProjectMember
|
|
8
7
|
|
|
9
|
-
import annofabcli
|
|
8
|
+
import annofabcli.common.cli
|
|
10
9
|
from annofabcli.common.cli import ArgumentParser, CommandLine, build_annofabapi_resource_and_login
|
|
11
10
|
from annofabcli.common.enums import FormatArgument
|
|
12
11
|
from annofabcli.common.facade import AnnofabApiFacade
|
|
@@ -113,7 +112,7 @@ def parse_args(parser: argparse.ArgumentParser) -> None:
|
|
|
113
112
|
parser.set_defaults(subcommand_func=main)
|
|
114
113
|
|
|
115
114
|
|
|
116
|
-
def add_parser(subparsers:
|
|
115
|
+
def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse.ArgumentParser:
|
|
117
116
|
subcommand_name = "list"
|
|
118
117
|
subcommand_help = "複数のプロジェクトのプロジェクトメンバを出力します。"
|
|
119
118
|
description = "複数のプロジェクトのプロジェクトメンバを出力します。"
|