Skip to content

Commit 0265217

Browse files
authored
Fix spurious MyPy errors arising from 0.641 version of MyPy (#266)
1 parent 51ebc7e commit 0265217

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/basilisp/lang/compiler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ def _def_ast(ctx: CompilerContext, form: llist.List) -> ASTStream:
494494
yield _node(ast.Call(
495495
func=_INTERN_VAR_FN_NAME,
496496
args=[ns_name, def_name, ast.Name(id=safe_name, ctx=ast.Load())],
497-
keywords=list(chain(dynamic_kwarg, _unwrap_nodes(meta)))))
497+
keywords=list(chain(dynamic_kwarg, _unwrap_nodes(meta))))) # type: ignore
498498

499499

500500
def _do_ast(ctx: CompilerContext, form: llist.List) -> ASTStream:
@@ -957,7 +957,7 @@ def _import_ast(ctx: CompilerContext, form: llist.List) -> ASTStream:
957957
last = ast.Name(id=module_name, ctx=ast.Load())
958958
yield _dependency(ast.Call(
959959
func=_load_attr(f'{_NS_VAR_VALUE}.add_import'),
960-
args=list(chain(_unwrap_nodes(_to_ast(ctx, s)), [last])),
960+
args=list(chain(_unwrap_nodes(_to_ast(ctx, s)), [last])), # type: ignore
961961
keywords=[]))
962962

963963
assert last is not None
@@ -1139,7 +1139,7 @@ def _recur_ast(ctx: CompilerContext, form: llist.List) -> ASTStream:
11391139

11401140
has_vargs = any([s == _AMPERSAND for s in ctx.recur_point.args])
11411141
yield _node(ast.Call(func=_TRAMPOLINE_ARGS_FN_NAME,
1142-
args=list(itertools.chain([ast.NameConstant(has_vargs)],
1142+
args=list(itertools.chain([ast.NameConstant(has_vargs)], # type: ignore
11431143
_unwrap_nodes(exprs))),
11441144
keywords=[]))
11451145
except IndexError:
@@ -1860,7 +1860,7 @@ def compile_and_exec_form(form: LispForm, # pylint: disable= too-many-arguments
18601860
# rather than using Var.find indrection.
18611861
final_wrapped_name = genname(wrapped_fn_name)
18621862
body = _expressionize([form_ast[-1]], final_wrapped_name)
1863-
form_ast = list(itertools.chain(map(_statementize, form_ast[:-1]), [body]))
1863+
form_ast = list(itertools.chain(map(_statementize, form_ast[:-1]), [body])) # type: ignore
18641864

18651865
ast_module = ast.Module(body=form_ast)
18661866
ast.fix_missing_locations(ast_module)

0 commit comments

Comments
 (0)