Uppercase DELETE_ENV_VAR

This commit is contained in:
Kovid Goyal
2021-09-16 10:16:33 +05:30
parent 5b716df45f
commit 5f32d2e56f
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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]:
+2 -2
View File
@@ -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]]]: