Skip to content

Commit 7df8e6f

Browse files
committed
Apply black
1 parent 11a72fb commit 7df8e6f

File tree

9 files changed

+9
-15
lines changed

9 files changed

+9
-15
lines changed

bpython/autocomplete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757

5858
logger = logging.getLogger(__name__)
5959

60+
6061
# Autocomplete modes
6162
class AutocompleteModes(Enum):
6263
NONE = "none"
@@ -381,7 +382,6 @@ def format(self, filename: str) -> str:
381382

382383

383384
class AttrCompletion(BaseCompletionType):
384-
385385
attr_matches_re = LazyReCompile(r"(\w+(\.\w+)*)\.(\w*)")
386386

387387
def matches(

bpython/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ def readlines(self, size: int = -1) -> List[str]:
264264
# the addstr stuff to a higher level.
265265
#
266266

267+
267268
# Have to ignore the return type on this one because the colors variable
268269
# is Optional[MutableMapping[str, int]] but for the purposes of this
269270
# function it can't be None

bpython/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def fill_config_with_default_values(
9090
if not config.has_section(section):
9191
config.add_section(section)
9292

93-
for (opt, val) in default_values[section].items():
93+
for opt, val in default_values[section].items():
9494
if not config.has_option(section, opt):
9595
config.set(section, opt, str(val))
9696

bpython/curtsiesfrontend/manual_readline.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717

1818
class AbstractEdits:
19-
2019
default_kwargs = {
2120
"line": "hello world",
2221
"cursor_offset": 5,

bpython/curtsiesfrontend/repl.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,6 @@ def insert_char_pair_end(self, e):
893893
self.add_normal_character(e)
894894

895895
def get_last_word(self):
896-
897896
previous_word = _last_word(self.rl_history.entry)
898897
word = _last_word(self.rl_history.back())
899898
line = self.current_line

bpython/repl.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,6 @@ def cursor_offset(self, value: int) -> None:
465465
self._set_cursor_offset(value)
466466

467467
if TYPE_CHECKING:
468-
469468
# not actually defined, subclasses must define
470469
cpos: int
471470

@@ -567,7 +566,7 @@ def current_string(self, concatenate=False):
567566
return ""
568567
opening = string_tokens.pop()[1]
569568
string = list()
570-
for (token, value) in reversed(string_tokens):
569+
for token, value in reversed(string_tokens):
571570
if token is Token.Text:
572571
continue
573572
elif opening is None:
@@ -602,7 +601,7 @@ def _funcname_and_argnum(
602601
# if keyword is not None, we've encountered a keyword and so we're done counting
603602
stack = [_FuncExpr("", "", 0, "")]
604603
try:
605-
for (token, value) in Python3Lexer().get_tokens(line):
604+
for token, value in Python3Lexer().get_tokens(line):
606605
if token is Token.Punctuation:
607606
if value in "([{":
608607
stack.append(_FuncExpr("", "", 0, value))
@@ -692,7 +691,6 @@ def get_args(self):
692691
# py3
693692
f.__new__.__class__ is not object.__new__.__class__
694693
):
695-
696694
class_f = f.__new__
697695

698696
if class_f:
@@ -1117,7 +1115,7 @@ def tokenize(self, s, newline=False) -> List[Tuple[_TokenType, str]]:
11171115
line_tokens: List[Tuple[_TokenType, str]] = list()
11181116
saved_tokens: List[Tuple[_TokenType, str]] = list()
11191117
search_for_paren = True
1120-
for (token, value) in split_lines(all_tokens):
1118+
for token, value in split_lines(all_tokens):
11211119
pos += len(value)
11221120
if token is Token.Text and value == "\n":
11231121
line += 1
@@ -1263,7 +1261,7 @@ def next_indentation(line, tab_length) -> int:
12631261

12641262

12651263
def split_lines(tokens):
1266-
for (token, value) in tokens:
1264+
for token, value in tokens:
12671265
if not value:
12681266
continue
12691267
while value:

bpython/test/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ def setUpClass(cls):
1313

1414

1515
class MagicIterMock(unittest.mock.MagicMock):
16-
1716
__next__ = unittest.mock.Mock(return_value=None)
1817

1918

bpython/test/test_repl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def set_input_line(self, line):
183183
self.repl.cursor_offset = len(line)
184184

185185
def test_func_name(self):
186-
for (line, expected_name) in [
186+
for line, expected_name in [
187187
("spam(", "spam"),
188188
# map pydoc has no signature in pypy
189189
("spam(any([]", "any") if pypy else ("spam(map([]", "map"),
@@ -194,7 +194,7 @@ def test_func_name(self):
194194
self.assertEqual(self.repl.current_func.__name__, expected_name)
195195

196196
def test_func_name_method_issue_479(self):
197-
for (line, expected_name) in [
197+
for line, expected_name in [
198198
("o.spam(", "spam"),
199199
# map pydoc has no signature in pypy
200200
("o.spam(any([]", "any") if pypy else ("o.spam(map([]", "map"),

bpython/urwid.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
else:
7575

7676
class EvalProtocol(basic.LineOnlyReceiver):
77-
7877
delimiter = "\n"
7978

8079
def __init__(self, myrepl):
@@ -570,7 +569,6 @@ def file_prompt(self, s: str) -> Optional[str]:
570569

571570

572571
class URWIDRepl(repl.Repl):
573-
574572
_time_between_redraws = 0.05 # seconds
575573

576574
def __init__(self, event_loop, palette, interpreter, config):

0 commit comments

Comments
 (0)