diff options
author | pravindalve | 2023-05-30 04:20:14 +0530 |
---|---|---|
committer | GitHub | 2023-05-30 04:20:14 +0530 |
commit | cbdd7ca21f1f673a3a739065098f7cc6c9c4b881 (patch) | |
tree | 595e888c38f00a314e751096b6bf636a544a5efe /venv/Lib/site-packages/isort/utils.py | |
parent | 7740d1ca0c2e6bf34900460b0c58fa4d528577fb (diff) | |
parent | 280c6aa89a15331fb76b7014957953dc72af6093 (diff) | |
download | Chemical-Simulator-GUI-cbdd7ca21f1f673a3a739065098f7cc6c9c4b881.tar.gz Chemical-Simulator-GUI-cbdd7ca21f1f673a3a739065098f7cc6c9c4b881.tar.bz2 Chemical-Simulator-GUI-cbdd7ca21f1f673a3a739065098f7cc6c9c4b881.zip |
Restructure Project and Deployment
Diffstat (limited to 'venv/Lib/site-packages/isort/utils.py')
-rw-r--r-- | venv/Lib/site-packages/isort/utils.py | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/venv/Lib/site-packages/isort/utils.py b/venv/Lib/site-packages/isort/utils.py deleted file mode 100644 index ce4e588..0000000 --- a/venv/Lib/site-packages/isort/utils.py +++ /dev/null @@ -1,53 +0,0 @@ -import os -import sys -from contextlib import contextmanager - - -def exists_case_sensitive(path): - """ - Returns if the given path exists and also matches the case on Windows. - - When finding files that can be imported, it is important for the cases to match because while - file os.path.exists("module.py") and os.path.exists("MODULE.py") both return True on Windows, Python - can only import using the case of the real file. - """ - result = os.path.exists(path) - if (sys.platform.startswith('win') or sys.platform == 'darwin') and result: - directory, basename = os.path.split(path) - result = basename in os.listdir(directory) - return result - - -@contextmanager -def chdir(path): - """Context manager for changing dir and restoring previous workdir after exit. - """ - curdir = os.getcwd() - os.chdir(path) - try: - yield - finally: - os.chdir(curdir) - - -def union(a, b): - """ Return a list of items that are in `a` or `b` - """ - u = [] - for item in a: - if item not in u: - u.append(item) - for item in b: - if item not in u: - u.append(item) - return u - - -def difference(a, b): - """ Return a list of items from `a` that are not in `b`. - """ - d = [] - for item in a: - if item not in b: - d.append(item) - return d |