mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-04 11:16:53 +00:00
Fix resource warnings
This commit is contained in:
parent
a193eab99e
commit
5dc306b35d
7 changed files with 14 additions and 7 deletions
|
|
@ -94,7 +94,8 @@ def test_dict_no_allow_kwargs_exprs(expression, calls):
|
|||
|
||||
def test_ignore_constructors():
|
||||
visitor = BuiltinTypeVisitor(ignore=('complex', 'dict', 'float', 'int', 'list', 'str', 'tuple'))
|
||||
visitor.visit(ast.parse(open(get_resource_path('builtin_constructors.py'), 'rb').read(), 'builtin_constructors.py'))
|
||||
with open(get_resource_path('builtin_constructors.py'), 'rb') as f:
|
||||
visitor.visit(ast.parse(f.read(), 'builtin_constructors.py'))
|
||||
assert visitor.builtin_type_calls == []
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue