Skip to content

Commit e7c6ab7

Browse files
Use positive condition for legacy flag check
Changed from 'if not legacy' to 'if legacy' for better readability. The positive condition directly maps to the flag name and avoids mental negation.
1 parent e262dff commit e7c6ab7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/snowflake/cli/_plugins/streamlit/streamlit_entity.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ def deploy(
107107
f"Streamlit {self.model.fqn.sql_identifier} already exists. Use 'replace' option to overwrite."
108108
)
109109

110-
if not legacy:
111-
self._deploy_versioned(bundle_map=bundle_map, replace=replace, prune=prune)
112-
else:
110+
if legacy:
113111
self._deploy_legacy(bundle_map=bundle_map, replace=replace, prune=prune)
112+
else:
113+
self._deploy_versioned(bundle_map=bundle_map, replace=replace, prune=prune)
114114

115115
return self.perform(EntityActions.GET_URL, action_context, *args, **kwargs)
116116

0 commit comments

Comments
 (0)