Skip to content

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented May 2, 2020

Only call tqdm.write (which inserts a newline) if
DummyTqdmFile.write is itself called with a string containing a
newline; otherwise buffer the rest of the string.

See changes in test_tqdm.py for the patterns this allows.

  • I have marked all applicable categories:
    • exception-raising fix
    • visual output fix
    • documentation modification
    • new feature
  • If applicable, I have mentioned the relevant/related issue(s)

Less important but also useful:

  • I have visited the source website, and in particular
    read the known issues
  • I have searched through the issue tracker for duplicates
  • I have mentioned version numbers, operating system and
    environment, where applicable:
    import tqdm, sys
    print(tqdm.__version__, sys.version, sys.platform)

@anntzer anntzer requested a review from casperdcl as a code owner May 2, 2020 17:43
@codecov-io
Copy link

codecov-io commented May 2, 2020

Codecov Report

Merging #960 (d649576) into devel (37094ed) will increase coverage by 0.08%.
The diff coverage is 94.11%.

@@            Coverage Diff             @@
##            devel     #960      +/-   ##
==========================================
+ Coverage   84.34%   84.42%   +0.08%     
==========================================
  Files          24       24              
  Lines        1603     1618      +15     
  Branches      264      265       +1     
==========================================
+ Hits         1352     1366      +14     
  Misses        215      215              
- Partials       36       37       +1     

@casperdcl casperdcl self-assigned this May 28, 2020
@casperdcl casperdcl added this to the v5.0.0 milestone May 28, 2020
@casperdcl casperdcl added p2-bug-warning ⚠ Visual output bad to-review 🔍 Awaiting final confirmation labels May 28, 2020
@casperdcl casperdcl added to-merge ↰ Imminent and removed to-review 🔍 Awaiting final confirmation labels Oct 26, 2020
@casperdcl casperdcl changed the title Don't insert spurious newlines in DummyTqdmFile. DummyTqdmFile line buffering Oct 26, 2020
@anntzer anntzer force-pushed the writenl branch 2 times, most recently from 285a5d2 to 61d805b Compare February 15, 2021 13:54
@anntzer
Copy link
Contributor Author

anntzer commented Feb 15, 2021

kindly bumping.

@casperdcl
Copy link
Member

@anntzer I just made a couple of small fixes - let me know if it works for you.

@casperdcl casperdcl added c1-quick 🕐 Complexity low p3-enhancement 🔥 Much new such feature labels Feb 17, 2021
@anntzer
Copy link
Contributor Author

anntzer commented Feb 17, 2021

Seems reasonable to me.

casperdcl added a commit that referenced this pull request Feb 17, 2021
anntzer and others added 2 commits February 17, 2021 14:59
Only call `tqdm.write` (which inserts a newline) if
`DummyTqdmFile.write` is itself called with a string containing a
newline; otherwise buffer the rest of the string.

See changes in test_tqdm.py for the patterns this allows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c1-quick 🕐 Complexity low p2-bug-warning ⚠ Visual output bad p3-enhancement 🔥 Much new such feature to-merge ↰ Imminent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants