Return sets of objects from all_dict. Will return three sets: {in module_name.__all__}, {in REFGUIDE*}, and {missing from others} Parameters ---------- all_dict : list List of non deprecated sub modules for module_name others : list List of su
(all_dict, others, names, module_name)
| 240 | |
| 241 | |
| 242 | def compare(all_dict, others, names, module_name): |
| 243 | """ |
| 244 | Return sets of objects from all_dict. |
| 245 | Will return three sets: |
| 246 | {in module_name.__all__}, |
| 247 | {in REFGUIDE*}, |
| 248 | and {missing from others} |
| 249 | |
| 250 | Parameters |
| 251 | ---------- |
| 252 | all_dict : list |
| 253 | List of non deprecated sub modules for module_name |
| 254 | others : list |
| 255 | List of sub modules for module_name |
| 256 | names : set |
| 257 | Set of function names or special directives present in |
| 258 | docstring of module_name |
| 259 | module_name : ModuleType |
| 260 | |
| 261 | Returns |
| 262 | ------- |
| 263 | only_all : set |
| 264 | only_ref : set |
| 265 | missing : set |
| 266 | """ |
| 267 | only_all = set() |
| 268 | for name in all_dict: |
| 269 | if name not in names: |
| 270 | for pat in REFGUIDE_AUTOSUMMARY_SKIPLIST: |
| 271 | if re.match(pat, module_name + '.' + name): |
| 272 | break |
| 273 | else: |
| 274 | only_all.add(name) |
| 275 | |
| 276 | only_ref = set() |
| 277 | missing = set() |
| 278 | for name in names: |
| 279 | if name not in all_dict: |
| 280 | for pat in REFGUIDE_ALL_SKIPLIST: |
| 281 | if re.match(pat, module_name + '.' + name): |
| 282 | if name not in others: |
| 283 | missing.add(name) |
| 284 | break |
| 285 | else: |
| 286 | only_ref.add(name) |
| 287 | |
| 288 | return only_all, only_ref, missing |
| 289 | |
| 290 | |
| 291 | def is_deprecated(f): |
no test coverage detected
searching dependent graphs…