3 files changed
+19
-28
lines changedLines changed: 0 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
14 |
| - | |
15 |
| - | |
16 |
| - | |
17 |
| - | |
18 | 13 |
| |
19 | 14 |
| |
20 | 15 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
177 | 177 |
| |
178 | 178 |
| |
179 | 179 |
| |
180 |
| - | |
| 180 | + | |
| 181 | + | |
181 | 182 |
| |
182 | 183 |
| |
183 | 184 |
| |
|
Lines changed: 17 additions & 22 deletions
@@ -143,7 +143,6 @@ def write_cache(local_fn, data):
143
143
144
144
# matplotlib build options, which can be altered using setup.cfg
145
145
options = {
146
- 'display_status': True,
147
146
'backend': None,
148
147
}
149
148
@@ -153,9 +152,6 @@ def write_cache(local_fn, data):
153
152
config = configparser.ConfigParser()
154
153
config.read(setup_cfg)
155
154
156
- if config.has_option('status', 'suppress'):
157
- options['display_status'] = not config.getboolean("status", "suppress")
158
-
159
155
if config.has_option('rc_options', 'backend'):
160
156
options['backend'] = config.get("rc_options", "backend")
161
157
@@ -168,31 +164,30 @@ def write_cache(local_fn, data):
168
164
options['local_freetype'] = lft or options.get('local_freetype', False)
169
165
170
166
171
-# Define the display functions only if display_status is True.
172
-if options['display_status']:
173
- def print_line(char='='):
174
- print(char * 80)
167
+if '-q' in sys.argv or '--quiet' in sys.argv:
168
+ def print_raw(*args, **kwargs): pass # Suppress our own output.
169
+else:
170
+ print_raw = print
171
+
172
+
173
+def print_line(char='='):
174
+ print_raw(char * 80)
175
+
175
176
176
- def print_status(package, status):
177
- initial_indent = "%12s: " % package
178
- indent = ' ' * 18
179
- print(textwrap.fill(str(status), width=80,
177
+def print_status(package, status):
178
+ initial_indent = "%12s: " % package
179
+ indent = ' ' * 18
180
+ print_raw(textwrap.fill(str(status), width=80,
180
181
initial_indent=initial_indent,
181
182
subsequent_indent=indent))
182
183
183
- def print_message(message):
184
- indent = ' ' * 18 + "* "
185
- print(textwrap.fill(str(message), width=80,
184
+
185
+def print_message(message):
186
+ indent = ' ' * 18 + "* "
187
+ print_raw(textwrap.fill(str(message), width=80,
186
188
initial_indent=indent,
187
189
subsequent_indent=indent))
188
190
189
- def print_raw(section):
190
- print(section)
191
-else:
192
- def print_line(*args, **kwargs):
193
- pass
194
- print_status = print_message = print_raw = print_line
195
-
196
191
197
192
def get_buffer_hash(fd):
198
193
BLOCKSIZE = 1 << 16
0 commit comments