Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing end keyword argument to Text.from_markup #2095

Merged

Conversation

wasi-master
Copy link
Contributor

@wasi-master wasi-master commented Mar 22, 2022

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

Fixes #2054

@willmcgugan
Copy link
Collaborator

Would you mind adding a test for this?

@wasi-master
Copy link
Contributor Author

Yeah I thought about that, Let's see...

@wasi-master
Copy link
Contributor Author

wasi-master commented Mar 22, 2022

@willmcgugan So will this do?

def test_end():
    console = Console(width=20, file=StringIO())
    test = Group(Text.from_markup("foo", end=" "), Text.from_markup("bar"))
    console.print(test)
    assert console.file.getvalue()  == "foo bar\n"

If you want I'll commit these

@willmcgugan
Copy link
Collaborator

Perfect

@wasi-master
Copy link
Contributor Author

wasi-master commented Mar 22, 2022

@willmcgugan Done

Ran the tests locally, passed :)

@wasi-master
Copy link
Contributor Author

wasi-master commented Mar 22, 2022

GitHub actions failed. Time to run black again

@wasi-master
Copy link
Contributor Author

Sorry for the inconvenience, forgot to run black on the new tests

@willmcgugan
Copy link
Collaborator

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Possible missing end keyword argument in Text.from_markup
2 participants