Skip to content

Commit

Permalink
remove cast
Browse files Browse the repository at this point in the history
  • Loading branch information
sidhujus committed Sep 20, 2024
1 parent e946cb9 commit 3db6d6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions samcli/lib/utils/file_observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from abc import ABC, abstractmethod
from pathlib import Path
from threading import Lock, Thread
from typing import Callable, Dict, List, Optional, cast
from typing import Callable, Dict, List, Optional

import docker
from docker import DockerClient
Expand Down Expand Up @@ -462,8 +462,8 @@ def on_change(self, event: FileSystemEvent) -> None:
if path == event.src_path
or path in self._watch_dog_observed_paths.get(f"{event.src_path!r}_False", [])
]
else:
observed_paths = [path for path in _observed_paths if cast(str, event.src_path).startswith(path)]
elif isinstance(event.src_path, str):
observed_paths = [path for path in _observed_paths if event.src_path.startswith(path)]

if not observed_paths:
continue
Expand Down

0 comments on commit 3db6d6e

Please sign in to comment.