Clean up
This commit is contained in:
parent
f415070c11
commit
a6c2e7897a
2 changed files with 0 additions and 22 deletions
|
|
@ -1,21 +0,0 @@
|
||||||
"""
|
|
||||||
This module contains helper functions for evaluating python code and
|
|
||||||
managing local variables.
|
|
||||||
"""
|
|
||||||
|
|
||||||
import copy
|
|
||||||
import types
|
|
||||||
from typing import Any, Dict
|
|
||||||
|
|
||||||
__all__ = ["copy_local_variables"]
|
|
||||||
|
|
||||||
def copy_local_variables(local: Dict[str, Any]) -> Dict[str, Any]:
|
|
||||||
local_copy = {}
|
|
||||||
|
|
||||||
for key, value in local:
|
|
||||||
if isinstance(value, types.ModuleType):
|
|
||||||
local_copy[key] = value
|
|
||||||
else:
|
|
||||||
local_copy[key] = copy.deepcopy(value)
|
|
||||||
|
|
||||||
return local_copy
|
|
||||||
1
mypy.ini
1
mypy.ini
|
|
@ -2,4 +2,3 @@
|
||||||
disallow_untyped_defs = True
|
disallow_untyped_defs = True
|
||||||
disallow_incomplete_defs = True
|
disallow_incomplete_defs = True
|
||||||
no_implicit_optional = True
|
no_implicit_optional = True
|
||||||
ignore_missing_imports = True
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue