Skip to content

Commit 8773945

Browse files
committed
Remove unused code for document cleanup and version handling in conf.py
1 parent d7ead57 commit 8773945

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

docs/conf.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,31 @@
1515
import shutil
1616
import sys
1717

18-
keep_files = {'highlight_test_lexer.py', 'conf.py', 'make.bat', 'Makefile'}
19-
for item in os.listdir('../docs'):
20-
if item not in keep_files:
21-
path = os.path.join('../docs', item)
22-
try:
23-
if os.path.isfile(path):
24-
os.remove(path)
25-
elif os.path.isdir(path):
26-
shutil.rmtree(path)
27-
except Exception as e:
28-
print(f"Error deleting {item}: {e}")
29-
30-
build_version = os.environ.get('CURRENT_VERSION', 'v2')
31-
if build_version == 'v2':
32-
shutil.copytree(
33-
os.path.join(os.path.dirname(__file__), ''),
34-
os.path.join(os.path.dirname(__file__)),
35-
dirs_exist_ok=True
36-
)
37-
else:
38-
shutil.copytree(
39-
os.path.join(os.path.dirname(__file__), '../docs_state'),
40-
os.path.join(os.path.dirname(__file__)),
41-
dirs_exist_ok=True
42-
)
18+
# keep_files = {'highlight_test_lexer.py', 'conf.py', 'make.bat', 'Makefile'}
19+
# for item in os.listdir('../docs'):
20+
# if item not in keep_files:
21+
# path = os.path.join('../docs', item)
22+
# try:
23+
# if os.path.isfile(path):
24+
# os.remove(path)
25+
# elif os.path.isdir(path):
26+
# shutil.rmtree(path)
27+
# except Exception as e:
28+
# print(f"Error deleting {item}: {e}")
29+
#
30+
# build_version = os.environ.get('CURRENT_VERSION', 'v2')
31+
# if build_version == 'v2':
32+
# shutil.copytree(
33+
# os.path.join(os.path.dirname(__file__), ''),
34+
# os.path.join(os.path.dirname(__file__)),
35+
# dirs_exist_ok=True
36+
# )
37+
# else:
38+
# shutil.copytree(
39+
# os.path.join(os.path.dirname(__file__), '../docs_state'),
40+
# os.path.join(os.path.dirname(__file__)),
41+
# dirs_exist_ok=True
42+
# )
4343

4444
sys.path.insert(0, os.path.abspath('../docs/'))
4545
sys.path.insert(0, os.path.abspath('../'))

0 commit comments

Comments
 (0)