summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/checks.py14
-rw-r--r--utils/jssplitter_generator.py3
2 files changed, 6 insertions, 11 deletions
diff --git a/utils/checks.py b/utils/checks.py
index 3d421b385..4580ec584 100644
--- a/utils/checks.py
+++ b/utils/checks.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
"""
utils.checks
~~~~~~~~~~~~
@@ -70,9 +69,6 @@ def sphinx_has_header(physical_line, filename, lines, line_number):
for lno, line in enumerate(lines):
llist.append(line)
if lno == 0:
- if line != '# -*- coding: utf-8 -*-\n':
- return 0, 'X101 missing coding declaration'
- elif lno == 1:
if line != '"""\n' and line != 'r"""\n':
return 0, 'X101 missing docstring begin (""")'
else:
@@ -80,20 +76,20 @@ def sphinx_has_header(physical_line, filename, lines, line_number):
elif doc_open:
if line == '"""\n':
# end of docstring
- if lno <= 4:
+ if lno <= 3:
return 0, 'X101 missing module name in docstring'
break
if line != '\n' and line[:4] != ' ' and doc_open:
return 0, 'X101 missing correct docstring indentation'
- if lno == 2:
+ if lno == 1:
mod_name_len = len(line.strip())
if line.strip() != mod_name:
- return 4, 'X101 wrong module name in docstring heading'
- elif lno == 3:
+ return 2, 'X101 wrong module name in docstring heading'
+ elif lno == 2:
if line.strip() != mod_name_len * '~':
- return (4, 'X101 wrong module name underline, should be '
+ return (3, 'X101 wrong module name underline, should be '
'~~~...~')
else:
return 0, 'X101 missing end and/or start of docstring...'
diff --git a/utils/jssplitter_generator.py b/utils/jssplitter_generator.py
index 2ffe4cc99..c7bf162ef 100644
--- a/utils/jssplitter_generator.py
+++ b/utils/jssplitter_generator.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
import json
import re
import subprocess
@@ -112,7 +111,7 @@ console.log(' ... ok\\n')
''' % js_src
-python_src = '''# -*- coding: utf-8 -*-
+python_src = '''\
"""
sphinx.search.jssplitter
~~~~~~~~~~~~~~~~~~~~~~~~