Changeset View
Changeset View
Standalone View
Standalone View
python_modules/dagster/dagster/cli/workspace/workspace.py
Show First 20 Lines • Show All 206 Lines • ▼ Show 20 Lines | class Workspace(IWorkspace): | ||||
def repository_location_names(self): | def repository_location_names(self): | ||||
with self._lock: | with self._lock: | ||||
return list(self._location_entry_dict) | return list(self._location_entry_dict) | ||||
def has_repository_location(self, location_name): | def has_repository_location(self, location_name): | ||||
check.str_param(location_name, "location_name") | check.str_param(location_name, "location_name") | ||||
return self.get_repository_location(location_name) != None | return self.get_repository_location(location_name) != None | ||||
def get_repository_location(self, location_name): | def get_repository_location(self, location_name: str) -> Optional[RepositoryLocation]: | ||||
with self._lock: | with self._lock: | ||||
return ( | return ( | ||||
self._location_entry_dict.get(location_name).repository_location | self._location_entry_dict.get(location_name).repository_location | ||||
if location_name in self._location_entry_dict | if location_name in self._location_entry_dict | ||||
else None | else None | ||||
) | ) | ||||
def has_repository_location_error(self, location_name): | def has_repository_location_error(self, location_name): | ||||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |