Minor changes

This commit is contained in:
oobabooga 2023-06-20 20:23:21 -03:00 committed by GitHub
parent 5cbc0b28f2
commit c0a1baa46e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,6 @@
import argparse import argparse
import glob import glob
import os import os
import shutil
import site import site
import subprocess import subprocess
import sys import sys
@ -72,6 +71,7 @@ def install_dependencies():
if sys.platform.startswith("win"): if sys.platform.startswith("win"):
# punctuation contains: !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ # punctuation contains: !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
from string import punctuation from string import punctuation
# Allow some characters: _-:\/.'" # Allow some characters: _-:\/.'"
special_characters = punctuation.translate({ord(char): None for char in '_-:\\/.\'"'}) special_characters = punctuation.translate({ord(char): None for char in '_-:\\/.\'"'})
if any(char in script_dir for char in special_characters): if any(char in script_dir for char in special_characters):