Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 10ead95

Browse files
authored
Sync typeshed (#6269)
1 parent ef92542 commit 10ead95

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

mypy/dmypy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,8 @@ def request(status_file: str, command: str, *, timeout: Optional[int] = None,
434434
_, name = get_status(status_file)
435435
try:
436436
with IPCClient(name, timeout) as client:
437-
client.write(bdata)
438-
response = receive(client)
437+
client.write(bdata)
438+
response = receive(client)
439439
except (OSError, IPCException) as err:
440440
return {'error': str(err)}
441441
# TODO: Other errors, e.g. ValueError, UnicodeError

mypy/newsemanal/semanal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,8 +2022,8 @@ def process_type_annotation(self, s: AssignmentStmt) -> None:
20222022
s.type = analyzed
20232023
if (self.type and self.type.is_protocol and isinstance(lvalue, NameExpr) and
20242024
isinstance(s.rvalue, TempNode) and s.rvalue.no_rhs):
2025-
if isinstance(lvalue.node, Var):
2026-
lvalue.node.is_abstract_var = True
2025+
if isinstance(lvalue.node, Var):
2026+
lvalue.node.is_abstract_var = True
20272027
else:
20282028
if (any(isinstance(lv, NameExpr) and lv.is_inferred_def for lv in s.lvalues) and
20292029
self.type and self.type.is_protocol and not self.is_func_scope()):

mypy/semanal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,8 +1908,8 @@ def process_type_annotation(self, s: AssignmentStmt) -> None:
19081908
s.type = self.anal_type(s.type, allow_tuple_literal=allow_tuple_literal)
19091909
if (self.type and self.type.is_protocol and isinstance(lvalue, NameExpr) and
19101910
isinstance(s.rvalue, TempNode) and s.rvalue.no_rhs):
1911-
if isinstance(lvalue.node, Var):
1912-
lvalue.node.is_abstract_var = True
1911+
if isinstance(lvalue.node, Var):
1912+
lvalue.node.is_abstract_var = True
19131913
else:
19141914
if (any(isinstance(lv, NameExpr) and lv.is_inferred_def for lv in s.lvalues) and
19151915
self.type and self.type.is_protocol and not self.is_func_scope()):

mypy/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,9 +1819,9 @@ class TypeStrVisitor(SyntheticTypeVisitor[str]):
18191819
def __init__(self, id_mapper: Optional[IdMapper] = None) -> None:
18201820
self.id_mapper = id_mapper
18211821

1822-
def visit_unbound_type(self, t: UnboundType)-> str:
1822+
def visit_unbound_type(self, t: UnboundType) -> str:
18231823
s = t.name + '?'
1824-
if t.args != []:
1824+
if t.args:
18251825
s += '[{}]'.format(self.list_str(t.args))
18261826
return s
18271827

runtests.py

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

88
# Use the Python provided to execute the script, or fall back to a sane default
99
if version_info >= (3, 4, 0):
10-
python_name = executable
10+
python_name = executable
1111
else:
1212
if platform == 'win32':
1313
python_name = 'py -3'

0 commit comments

Comments
 (0)