Skip to content

Commit

Permalink
refactor: extract function
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSchiavini committed Oct 9, 2024
1 parent b98fe9d commit f2e1da7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions boa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ def swap_env(new_env):
yield


def set_env(new_env):
def _set_env(new):
global env
get_env = lambda: env # noqa: E731
env = new
Env._singleton = new

def setter(new):
global env
env = new
Env._singleton = new

return Open(get_env, setter, new_env)
def set_env(new_env):
global env
get_env = lambda: env # noqa: E731
return Open(get_env, _set_env, new_env)


def fork(
Expand Down

0 comments on commit f2e1da7

Please sign in to comment.