Uppercase DELETE_ENV_VAR
This commit is contained in:
+2
-2
@@ -209,7 +209,7 @@ class Child:
|
||||
|
||||
@property
|
||||
def final_env(self) -> Dict[str, str]:
|
||||
from kitty.options.utils import delete_env_var
|
||||
from kitty.options.utils import DELETE_ENV_VAR
|
||||
env: Optional[Dict[str, str]] = getattr(self, '_final_env', None)
|
||||
if env is None:
|
||||
env = self._final_env = default_env().copy()
|
||||
@@ -233,7 +233,7 @@ class Child:
|
||||
from .shell_integration import get_supported_shell_name
|
||||
if get_supported_shell_name(self.argv[0]):
|
||||
env['KITTY_SHELL_INTEGRATION'] = opts.shell_integration
|
||||
env = {k: v for k, v in env.items() if v is not delete_env_var}
|
||||
env = {k: v for k, v in env.items() if v is not DELETE_ENV_VAR}
|
||||
return env
|
||||
|
||||
def fork(self) -> Optional[int]:
|
||||
|
||||
@@ -42,7 +42,7 @@ for x in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ':
|
||||
sequence_sep = '>'
|
||||
func_with_args, args_funcs = key_func()
|
||||
FuncArgsType = Tuple[str, Sequence[Any]]
|
||||
delete_env_var = '_delete_this_env_var_'
|
||||
DELETE_ENV_VAR = '_delete_this_env_var_'
|
||||
|
||||
|
||||
class InvalidMods(ValueError):
|
||||
@@ -742,7 +742,7 @@ def env(val: str, current_val: Dict[str, str]) -> Iterable[Tuple[str, str]]:
|
||||
v = expandvars(v, current_val)
|
||||
yield key, v
|
||||
else:
|
||||
yield val, delete_env_var
|
||||
yield val, DELETE_ENV_VAR
|
||||
|
||||
|
||||
def kitten_alias(val: str) -> Iterable[Tuple[str, List[str]]]:
|
||||
|
||||
Reference in New Issue
Block a user