Skip to content

Commit 146e972

Browse files
committed
lint
1 parent e8cdba4 commit 146e972

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

easybuild/os_hook.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
class OSProxy(types.ModuleType):
99
"""Proxy module to intercept os attribute access."""
1010
overrides = {}
11+
1112
def __init__(self, real_os):
1213
super().__init__("os")
1314
self._real_os = real_os
@@ -23,6 +24,7 @@ def __dir__(self):
2324
def register_override(cls, name, value):
2425
cls.overrides[name] = value
2526

27+
2628
class OSFinder(importlib.abc.MetaPathFinder):
2729
"""Meta path finder to intercept imports of 'os' and return our proxy."""
2830
def find_spec(self, fullname, path, target=None):

easybuild/tools/environment.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def get_changes():
9595
"""
9696
return get_context()
9797

98+
9899
def apply_context(context = None):
99100
"""Return the current environment with the changes tracked in the context applied.
100101
@@ -127,8 +128,10 @@ def with_environment(copy_current=False):
127128
# Get a key that does not exist in _contextes
128129
base = '_context_'
129130
cnt = 0
130-
while (context := f"{base}{cnt}") in _contextes:
131+
context = f"{base}{cnt}"
132+
while context in _contextes:
131133
cnt += 1
134+
context = f"{base}{cnt}"
132135

133136
prev_context = _curr_context
134137
kwargs = {}

0 commit comments

Comments
 (0)