Config: Define _REFUSE_MODE_MASK constant

Extract the magic 0o0027 default for refuse_mode_mask into a module-
level constant with a docstring. This makes the default parameter
self-documenting and prevents duplication if the value ever changes.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-07-14 14:51:26 +02:00 • committed by janware DevOps
commit 544d80949f
Signed by: DevOps
SSH key fingerprint: SHA256:cZiw7ExG5q3KAVm7Jse3rGITowu0VjgUgNMPbifmY8g

View file

@ -10,6 +10,10 @@ from .stree import serdes
from .log import DEBUG, ERR, slog, get_caller_pos
from .stree.StringTree import StringTree
# Default file mode mask for secret-checking: reject group-write or
# world-accessible files that contain password/secret-like content.
_REFUSE_MODE_MASK: int = 0o0027
class Config(): # export
def __load(self, search_dirs, glob_paths, refuse_mode_mask):
@ -73,7 +77,7 @@ class Config(): # export
tree: Optional[StringTree] = None,
parent = None,
root_section = None,
refuse_mode_mask = 0o0027
refuse_mode_mask: int = _REFUSE_MODE_MASK
) -> None:
self.__parent = parent