MCPcopy
hub / github.com/StevenBlack/hosts / get_defaults

Function get_defaults

updateHostsFile.py:56–94  ·  view source on GitHub ↗

Helper method for getting the default settings. Returns ------- default_settings : dict A dictionary of the default settings when updating host information.

()

Source from the content-addressed store, hash-verified

54
55
56def get_defaults():
57 """
58 Helper method for getting the default settings.
59
60 Returns
61 -------
62 default_settings : dict
63 A dictionary of the default settings when updating host information.
64 """
65
66 return {
67 "numberofrules": 0,
68 "datapath": path_join_robust(BASEDIR_PATH, "data"),
69 "freshen": True,
70 "replace": False,
71 "backup": False,
72 "skipstatichosts": False,
73 "keepdomaincomments": True,
74 "extensionspath": path_join_robust(BASEDIR_PATH, "extensions"),
75 "extensions": [],
76 "nounifiedhosts": False,
77 "compress": False,
78 "minimise": False,
79 "outputsubfolder": "",
80 "hostfilename": "hosts",
81 "targetip": "0.0.0.0",
82 "sourcedatafilename": "update.json",
83 "sourcesdata": [],
84 "readmefilename": "readme.md",
85 "readmetemplate": path_join_robust(BASEDIR_PATH, "readme_template.md"),
86 "readmedata": {},
87 "readmedatafilename": path_join_robust(BASEDIR_PATH, "readmeData.json"),
88 "exclusionpattern": r"([a-zA-Z\d-]+\.){0,}",
89 "exclusionregexes": [],
90 "exclusions": [],
91 "commonexclusions": ["hulu.com"],
92 "blacklistfile": path_join_robust(BASEDIR_PATH, "blacklist"),
93 "whitelistfile": path_join_robust(BASEDIR_PATH, "whitelist"),
94 }
95
96
97# End Project Settings

Callers 2

test_get_defaultsMethod · 0.90
mainFunction · 0.85

Calls 1

path_join_robustFunction · 0.85

Tested by 1

test_get_defaultsMethod · 0.72