|
5 | 5 | from collections.abc import Callable |
6 | 6 | from contextlib import AbstractAsyncContextManager, nullcontext |
7 | 7 | from datetime import UTC, datetime |
8 | | -from pathlib import PurePosixPath |
9 | 8 | from typing import TYPE_CHECKING |
10 | 9 |
|
11 | 10 | from sqlalchemy import select |
@@ -230,25 +229,25 @@ def __update_environment( |
230 | 229 | environment.default_url = update.default_url |
231 | 230 | if update.port is not None: |
232 | 231 | environment.port = update.port |
233 | | - if update.working_directory is not None and update.working_directory is RESET: |
| 232 | + if update.working_directory is RESET: |
234 | 233 | environment.working_directory = None |
235 | | - elif update.working_directory is not None and isinstance(update.working_directory, PurePosixPath): |
| 234 | + elif update.working_directory is not None: |
236 | 235 | environment.working_directory = update.working_directory |
237 | | - if update.mount_directory is not None and update.mount_directory is RESET: |
| 236 | + if update.mount_directory is RESET: |
238 | 237 | environment.mount_directory = None |
239 | | - elif update.mount_directory is not None and isinstance(update.mount_directory, PurePosixPath): |
| 238 | + elif update.mount_directory is not None: |
240 | 239 | environment.mount_directory = update.mount_directory |
241 | 240 | if update.uid is not None: |
242 | 241 | environment.uid = update.uid |
243 | 242 | if update.gid is not None: |
244 | 243 | environment.gid = update.gid |
245 | 244 | if update.args is RESET: |
246 | 245 | environment.args = None |
247 | | - elif isinstance(update.args, list): |
| 246 | + elif update.args is not None: |
248 | 247 | environment.args = update.args |
249 | 248 | if update.command is RESET: |
250 | 249 | environment.command = None |
251 | | - elif isinstance(update.command, list): |
| 250 | + elif update.command is not None: |
252 | 251 | environment.command = update.command |
253 | 252 | if update.is_archived is not None: |
254 | 253 | environment.is_archived = update.is_archived |
|
0 commit comments