Kaydet (Commit) f2b56518 authored tarafından Georg Brandl's avatar Georg Brandl

rstlint: recognize "deprecated-removed" directive

üst 6b4c847c
...@@ -15,7 +15,6 @@ import os ...@@ -15,7 +15,6 @@ import os
import re import re
import sys import sys
import getopt import getopt
import subprocess
from os.path import join, splitext, abspath, exists from os.path import join, splitext, abspath, exists
from collections import defaultdict from collections import defaultdict
...@@ -33,7 +32,8 @@ directives = [ ...@@ -33,7 +32,8 @@ directives = [
'autoexception', 'autofunction', 'automethod', 'automodule', 'centered', 'autoexception', 'autofunction', 'automethod', 'automodule', 'centered',
'cfunction', 'class', 'classmethod', 'cmacro', 'cmdoption', 'cmember', 'cfunction', 'class', 'classmethod', 'cmacro', 'cmdoption', 'cmember',
'code-block', 'confval', 'cssclass', 'ctype', 'currentmodule', 'cvar', 'code-block', 'confval', 'cssclass', 'ctype', 'currentmodule', 'cvar',
'data', 'deprecated', 'describe', 'directive', 'doctest', 'envvar', 'event', 'data', 'deprecated-removed', 'deprecated(?!-removed)', 'describe', 'directive',
'doctest', 'envvar', 'event',
'exception', 'function', 'glossary', 'highlight', 'highlightlang', 'index', 'exception', 'function', 'glossary', 'highlight', 'highlightlang', 'index',
'literalinclude', 'method', 'module', 'moduleauthor', 'productionlist', 'literalinclude', 'method', 'module', 'moduleauthor', 'productionlist',
'program', 'role', 'sectionauthor', 'seealso', 'sourcecode', 'staticmethod', 'program', 'role', 'sectionauthor', 'seealso', 'sourcecode', 'staticmethod',
...@@ -51,6 +51,7 @@ checkers = {} ...@@ -51,6 +51,7 @@ checkers = {}
checker_props = {'severity': 1, 'falsepositives': False} checker_props = {'severity': 1, 'falsepositives': False}
def checker(*suffixes, **kwds): def checker(*suffixes, **kwds):
"""Decorator to register a function as a checker.""" """Decorator to register a function as a checker."""
def deco(func): def deco(func):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment