Skip to content

Commit 9d5db32

Browse files
Update to 1.3.1
Changelog: + Applies proper indentation on multi-line indents
1 parent c33d90e commit 9d5db32

File tree

11 files changed

+14
-4
lines changed

11 files changed

+14
-4
lines changed

doc/build/doctrees/about.doctree

-4 Bytes
Binary file not shown.
-3 Bytes
Binary file not shown.

doc/build/doctrees/basics.doctree

-3 Bytes
Binary file not shown.

doc/build/doctrees/classes.doctree

-3 Bytes
Binary file not shown.
-1 Bytes
Binary file not shown.
-3 Bytes
Binary file not shown.

doc/build/doctrees/globals.doctree

-3 Bytes
Binary file not shown.

doc/build/doctrees/index.doctree

-3 Bytes
Binary file not shown.

doc/build/html/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ <h1>About<a class="headerlink" href="#about" title="Permalink to this headline">
159159
<div class="line-block">
160160
<div class="line"><strong>Project</strong>: fpclib</div>
161161
<div class="line"><strong>Author</strong>: mathgeniuszach</div>
162-
<div class="line"><strong>Version</strong>: 1.3.0.19</div>
162+
<div class="line"><strong>Version</strong>: 1.3.1.4</div>
163163
<div class="line"><strong>Special Thanks</strong>:</div>
164164
</div>
165165
<ul class="simple">

fpclib/__init__.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,13 +355,14 @@ def debug(text, mode, *items, pre='[INFO] '):
355355
356356
:since 1.3:
357357
"""
358-
global TABULATION
358+
global DEBUG_LEVEL, TABULATION
359359
if TABULATION < 0:
360360
TABULATION = 0
361361
if DEBUG_LEVEL < 0 or (DEBUG_LEVEL > 0 and (mode == 1 or (DEBUG_LEVEL > 1 and DEBUG_LEVEL - 1 > TABULATION))):
362362
tabs = ' ' * TABULATION
363-
full_text = tabs + pre + text.format(*items)
363+
full_texts = (tabs + pre + text.format(*items)).split('\n')
364364

365+
full_text = full_texts[0]
365366
length = len(full_text)
366367
columns = shutil.get_terminal_size()[0] - 1
367368
if length <= columns:
@@ -378,6 +379,15 @@ def debug(text, mode, *items, pre='[INFO] '):
378379
i += available
379380
length -= available
380381
print(tabs + full_text[i:].strip())
382+
383+
if len(full_texts) > 1:
384+
temp_debug, DEBUG_LEVEL = DEBUG_LEVEL, -1
385+
try:
386+
e_pre = ' ' * len(pre)
387+
for full_text in full_texts[1:]:
388+
debug(full_text, mode, pre=e_pre)
389+
finally:
390+
DEBUG_LEVEL = temp_debug
381391

382392
def download(url, loc='', name=None, **kwargs):
383393
"""Downloads the webpage or file at :code:`url` to the location :code:`loc`.

0 commit comments

Comments
 (0)