Skip to content

Commit b780615

Browse files
Include add in CRUD keywords
1 parent d7488ca commit b780615

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

linodecli/helpers.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
# no path is specified.
1919
API_CA_PATH = os.getenv("LINODE_CLI_CA", None) or True
2020

21+
# Keywords used to infer whether an operation is a CRUD operation.
22+
CRUD_OPERATION_KEYWORDS = ["list", "view", "create", "add", "update", "delete"]
23+
2124

2225
def handle_url_overrides(
2326
url: str,
@@ -141,9 +144,7 @@ def __key(action: T) -> Any:
141144
name = key(action)
142145

143146
# Prioritize CRUD operations
144-
for i, crud_operation in enumerate(
145-
["list", "view", "create", "update", "delete"]
146-
):
147+
for i, crud_operation in enumerate(CRUD_OPERATION_KEYWORDS):
147148
name = name.replace(crud_operation, str(i))
148149

149150
return (

0 commit comments

Comments
 (0)