493 | | # lists of basic Python class which are documented as functions |
494 | | base_class_as_func = [ |
495 | | 'bool', 'complex', 'dict', 'file', 'float', |
496 | | 'frozenset', 'int', 'list', 'long', 'object', |
497 | | 'set', 'slice', 'str', 'tuple', 'type', 'unicode', 'xrange'] |
498 | | |
| 573 | # lists of basic Python class which are documented as functions |
| 574 | base_class_as_func = [ |
| 575 | 'bool', 'complex', 'dict', 'file', 'float', |
| 576 | 'frozenset', 'int', 'list', 'long', 'object', |
| 577 | 'set', 'slice', 'str', 'tuple', 'type', 'unicode', 'xrange'] |
| 578 | |
| 579 | # Nit picky option configuration: Put here broken links we want to ignore. For |
| 580 | # link to the Python documentation several links where broken because there |
| 581 | # where class listed as functions. Expand the list 'base_class_as_func' |
| 582 | # above instead of marking the link as broken. |
| 583 | nitpick_ignore = ( |
| 584 | ('py:class', 'twisted.web2.resource.Resource'), |
| 585 | ('py:class', 'twisted.web2.resource.PostableResource')) |
| 586 | |
| 587 | def nitpick_patch_config(app): |
| 588 | """ |
| 589 | Patch the default config for nitpicky |
| 590 | |
| 591 | Calling path_config ensure that nitpicky is not considered as a Sphinx |
| 592 | environment variable but rather as a Sage environment variable. As a |
| 593 | consequence, changing it doesn't force the recompilation of the entire |
| 594 | documentation. |
| 595 | """ |
| 596 | app.config.values['nitpicky'] = (False, 'sage') |
| 597 | app.config.values['nitpick_ignore'] = ([], 'sage') |
| 598 | |