Skip to content

Commit 15b1736

Browse files
committed
Bootstrap: Add block comments to make it more readbale
1 parent f357c50 commit 15b1736

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

bootstrap.py

+19-8
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
Execute Spyder from source checkout.
1515
"""
1616

17-
# pylint: disable=C0103
18-
# pylint: disable=C0412
19-
# pylint: disable=C0413
20-
2117
# Standard library imports
2218
import argparse
2319
import os
@@ -28,9 +24,13 @@
2824
from logging import Formatter, StreamHandler, getLogger
2925
from pathlib import Path
3026

27+
# Local imports
3128
from install_dev_repos import DEVPATH, REPOS, install_repo
3229

30+
31+
# =============================================================================
3332
# ---- Setup logger
33+
# =============================================================================
3434
fmt = Formatter('%(asctime)s [%(levelname)s] [%(name)s] -> %(message)s')
3535
h = StreamHandler()
3636
h.setFormatter(fmt)
@@ -40,8 +40,10 @@
4040

4141
time_start = time.time()
4242

43-
# ---- Parse command line
4443

44+
# =============================================================================
45+
# ---- Parse command line
46+
# =============================================================================
4547
parser = argparse.ArgumentParser(
4648
usage="python bootstrap.py [options] [-- spyder_options]",
4749
epilog="""\
@@ -72,7 +74,10 @@
7274
assert args.gui in (None, 'pyqt5', 'pyside2'), \
7375
"Invalid GUI toolkit option '%s'" % args.gui
7476

77+
78+
# =============================================================================
7579
# ---- Install sub repos
80+
# =============================================================================
7681
installed_dev_repo = False
7782
if not args.no_install:
7883
prev_branch = None
@@ -121,8 +126,10 @@
121126
original_sys_argv = sys.argv.copy()
122127
sys.argv = [sys.argv[0]] + args.spyder_options
123128

124-
# ---- Update os.environ
125129

130+
# =============================================================================
131+
# ---- Update os.environ
132+
# =============================================================================
126133
# Store variable to be used in self.restart (restart Spyder instance)
127134
os.environ['SPYDER_BOOTSTRAP_ARGS'] = str(original_sys_argv[1:])
128135

@@ -158,8 +165,10 @@
158165
logger.info("Skipping GUI toolkit detection")
159166
os.environ['QT_API'] = args.gui
160167

161-
# ---- Check versions
162168

169+
# =============================================================================
170+
# ---- Check versions
171+
# =============================================================================
163172
# Checking versions (among other things, this has the effect of setting the
164173
# QT_API environment variable if this has not yet been done just above)
165174
versions = get_versions(reporev=True)
@@ -175,8 +184,10 @@
175184
sys.exit("ERROR: Your qtpy version is outdated. Please install qtpy "
176185
"1.1.0 or higher to be able to work with Spyder!")
177186

178-
# ---- Execute Spyder
179187

188+
# =============================================================================
189+
# ---- Execute Spyder
190+
# =============================================================================
180191
if args.hide_console and os.name == 'nt':
181192
logger.info("Hiding parent console (Windows only)")
182193
sys.argv.append("--hide-console") # Windows only: show parent console

0 commit comments

Comments
 (0)