allow hyphen in annotation file name (#1074)

* remove old detritus

* allow hyphen in label file name
This commit is contained in:
Bruce Martin
2020-01-02 15:44:40 -08:00
committed by GitHub
parent 0b1bdca022
commit dfaf0d0603
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -221,7 +221,7 @@ def is_safe_collection_name(name):
"""
if name is None:
return False
return re.match(r"^\w+$", name) is not None
return re.match(r"^[\w\-]+$", name) is not None
def get_api_resources():
-1
View File
@@ -17,7 +17,6 @@ def read_labels(fname):
def write_labels(fname, df, header=None, backup_dir=None):
if backup_dir is not None:
backup(fname, backup_dir)
# rotate_fname(fname, backup_dir)
if not df.empty:
with open(fname, "w", newline="") as f:
if header is not None: