Commit edc8863b authored by Anton Pershin's avatar Anton Pershin

Removed typing_extensions to comply with python 3.9

parent ca70311b
import os import os
import os.path import os.path
import shutil import shutil
import paramiko
import subprocess import subprocess
import shlex import shlex
import json import json
...@@ -10,6 +9,8 @@ from stat import S_ISDIR ...@@ -10,6 +9,8 @@ from stat import S_ISDIR
from abc import ABCMeta, abstractmethod from abc import ABCMeta, abstractmethod
import logging import logging
import paramiko
import comsdk.comaux as aux import comsdk.comaux as aux
......
import pickle import pickle
from datetime import date from datetime import date
from typing import Sequence, Mapping from typing import Sequence, Mapping, TypedDict
from typing_extensions import TypedDict
from comsdk.comaux import * from comsdk.comaux import *
from comsdk.communication import BaseCommunication, LocalCommunication, SshCommunication, Host from comsdk.communication import BaseCommunication, LocalCommunication, SshCommunication, Host
...@@ -313,15 +312,19 @@ class ResearchDoesNotExist(Exception): ...@@ -313,15 +312,19 @@ class ResearchDoesNotExist(Exception):
def make_suitable_name(name: str) -> str: def make_suitable_name(name: str) -> str:
return '-'.join(name.split())
def make_suitable_task_name(name: str) -> str:
return '_'.join(name.split()) return '_'.join(name.split())
def make_suitable_research_dir(descr: str) -> str: def make_suitable_research_dir(descr: str) -> str:
return '_'.join([str(date.today()), make_suitable_name(descr)]) return '-'.join([str(date.today()), make_suitable_name(descr)])
def get_task_full_name(task_number: int, task_name: str) -> str: def get_task_full_name(task_number: int, task_name: str) -> str:
return str(task_number) + '-' + make_suitable_name(task_name) return str(task_number) + '-' + make_suitable_task_name(task_name)
def split_task_dir(task_dir: str) -> (int, str): def split_task_dir(task_dir: str) -> (int, str):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment