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:
parent
c7b4a6e118
commit
544d80949f
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue