Skip to content
Myr

apply formatting

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parent a1de45c · Browse files · 6 files+6 added−17 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

6 files+6 added−17 removed

  • tests:+1 added−5 removed
  • other:+5 added−12 removed

6 files+6 added−17 removed

modified:.github/ISSUE_TEMPLATE.md+1 added-1 removed
modified:docs/arguments.rst-1 removed
265 unmodified lines
266267.. click:run::268269 invoke(touch, ['-foo.txt', 'bar.txt'])270
modified:src/click/_compat.py+1 added-3 removed
426 unmodified lines
427428 def get_binary_stdin():429 reader = _find_binary_reader(sys.stdin)430 if reader is None:431 raise RuntimeError(432 "Was not able to determine binary stream for sys.stdin."433 )431 raise RuntimeError("Was not able to determine binary stream for sys.stdin.")432 return reader433434 def get_binary_stdout():435 writer = _find_binary_writer(sys.stdout)
355 unmodified lines
modified:src/click/core.py+2 added-6 removed
710 unmodified lines
711 """Given a context and a list of arguments this creates the parser712 and parses the arguments, then modifies the context as necessary.713 This is automatically invoked by :meth:`make_context`.714 """715 raise NotImplementedError(716 "Base commands do not know how to parse arguments."717 )715 raise NotImplementedError("Base commands do not know how to parse arguments.")716717 def invoke(self, ctx):718 """Given a context, this invokes the command. The default719 implementation is raising a not implemented error.
1051 unmodified lines
1771 raise TypeError("Cannot prompt for flags that are not bools.")1772 if not self.is_bool_flag and self.secondary_opts:1773 raise TypeError("Got secondary option for non boolean flag.")1774 if self.is_bool_flag and self.hide_input and self.prompt is not None:1777 raise TypeError(1778 "Hidden input does not work with boolean flag prompts."1779 )1775 raise TypeError("Hidden input does not work with boolean flag prompts.")1776 if self.count:1777 if self.multiple:1778 raise TypeError(1779 "Options cannot be multiple and count at the same time."
258 unmodified lines
modified:tests/test_termui.py+1 added-5 removed
309 unmodified lines
310 assert click.getchar() == special_key_char + key_char311312313@pytest.mark.parametrize(314 ("key_char", "exc"),315 [316 (u"\x03", KeyboardInterrupt),317 (u"\x1a", EOFError),318 ],314 ("key_char", "exc"), [(u"\x03", KeyboardInterrupt), (u"\x1a", EOFError)],315)316@pytest.mark.skipif(not WIN, reason="Tests user-input using the msvcrt module.")317def test_getchar_windows_exceptions(runner, monkeypatch, key_char, exc):318 monkeypatch.setattr(click._termui_impl.msvcrt, "getwch", lambda: key_char)
4 unmodified lines
modified:CONTRIBUTING.rst+1 added-1 removed
9 unmodified lines
10Please, don't use the issue tracker for this. Check whether the11``#pocoo`` IRC channel on Freenode can help with your issue. If your problem12is not strictly Click-specific, ``#python`` on Freenode is generally more13active. Also try searching or asking on `Stack Overflow`_ with the14``python-click`` tag. 14``python-click`` tag.1516.. _Stack Overflow: https://stackoverflow.com/questions/tagged/python-click?sort=votes1718Reporting issues
48 unmodified lines