Skip to content

Commit 2a7fd36

Browse files
author
aviat cohen
committed
update docstring
1 parent d7af1a5 commit 2a7fd36

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

src/fabric_cli/commands/fs/mkdir/fab_fs_mkdir_item.py

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,33 @@
1616

1717

1818
def exec(item: Item, args: Namespace) -> str | None:
19-
"""Execute the creation of a Microsoft Fabric item.
20-
21-
Handles two scenarios based on is_root_operation:
22-
- **Root operation** (is_root_operation = True): User-initiated standalone creation.
23-
Shows individual output, handles dependencies, and cleans up batch collection.
24-
- **Batch operation** (is_root_operation = False): Part of dependency creation chain.
25-
Operates silently, collects results for consolidated output by root operation.
26-
19+
"""
20+
Execute the creation of a Microsoft Fabric item.
21+
22+
This method supports items that may require creating additional dependent
23+
artifacts (e.g., a Report that implicitly creates a SemanticModel).
24+
Output behavior differs depending on whether the current call represents the
25+
user‑requested creation or an internally triggered dependency.
26+
27+
Two execution modes:
28+
- **Root operation** (`is_root_operation=True`):
29+
Represents the item explicitly requested by the user.
30+
Handles creation of the item and any required dependencies.
31+
Collects and returns a consolidated output for all created artifacts.
32+
33+
- **Dependency operation** (`is_root_operation=False`):
34+
Represents an item created implicitly as part of another item's dependency chain.
35+
Runs silently and contributes its result to the root operation’s batch output,
36+
without producing standalone output.
37+
2738
Args:
28-
item (Item): The Fabric item to be created
29-
args (Namespace): Command arguments, may contain 'output_batch' for batch operations
30-
39+
item (Item): The Fabric item to be created.
40+
args (Namespace): Command arguments. May include `output_batch` used to
41+
accumulate results during dependency operations.
42+
3143
Returns:
32-
str | None: Created item ID if successful, None if failed
44+
str | None: The created item ID for root operations, or None for dependency
45+
operations or failed creations.
3346
"""
3447
# Determine if this is part of a batch operation
3548
is_root_operation = not hasattr(args, 'output_batch')

0 commit comments

Comments
 (0)