kopia lustrzana https://github.com/espressif/esp-idf
docs: flake8 fixes
rodzic
ac8e931179
commit
d03af45731
|
@ -142,7 +142,7 @@ def parallel_call(args, callback):
|
|||
for ret, entry in zip(errcodes, entries):
|
||||
if ret != 0:
|
||||
print("language: %s, target: %s, errcode: %d" % (entry[0], entry[1], ret))
|
||||
#Don't re-throw real error code from each parallel process
|
||||
# Don't re-throw real error code from each parallel process
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
|
@ -197,7 +197,7 @@ def sphinx_call(language, target, build_dir, sphinx_parallel_jobs, buildername):
|
|||
except KeyboardInterrupt: # this seems to be the only way to get Ctrl-C to kill everything?
|
||||
p.kill()
|
||||
os.chdir(saved_cwd)
|
||||
return 130 #FIXME It doesn't return this errorcode, why? Just prints stacktrace
|
||||
return 130 # FIXME It doesn't return this errorcode, why? Just prints stacktrace
|
||||
os.chdir(saved_cwd)
|
||||
return ret
|
||||
|
||||
|
@ -315,7 +315,8 @@ def call_linkcheck(entry):
|
|||
GH_LINK_RE = r"https://github.com/espressif/esp-idf/(?:tree|blob|raw)/[^\s]+"
|
||||
|
||||
# we allow this one link, because we always want users to see the latest support policy
|
||||
GH_LINK_ALLOWED = [ "https://github.com/espressif/esp-idf/blob/master/SUPPORT_POLICY.md" ]
|
||||
GH_LINK_ALLOWED = ["https://github.com/espressif/esp-idf/blob/master/SUPPORT_POLICY.md"]
|
||||
|
||||
|
||||
def action_gh_linkcheck(args):
|
||||
print("Checking for hardcoded GitHub links\n")
|
||||
|
@ -326,12 +327,12 @@ def action_gh_linkcheck(args):
|
|||
for root, _, files in os.walk(docs_dir):
|
||||
if "_build" in root:
|
||||
continue
|
||||
files = [ os.path.join(root, f) for f in files if f.endswith(".rst") ]
|
||||
files = [os.path.join(root, f) for f in files if f.endswith(".rst")]
|
||||
for path in files:
|
||||
with open(path, "r") as f:
|
||||
for link in re.findall(GH_LINK_RE, f.read()):
|
||||
if link not in GH_LINK_ALLOWED:
|
||||
github_links.append((path, link))
|
||||
for link in re.findall(GH_LINK_RE, f.read()):
|
||||
if link not in GH_LINK_ALLOWED:
|
||||
github_links.append((path, link))
|
||||
|
||||
if github_links:
|
||||
for path, link in github_links:
|
||||
|
|
|
@ -160,6 +160,7 @@ def update_exclude_patterns(tags):
|
|||
'api-reference/peripherals/temp_sensor.rst']:
|
||||
exclude_patterns.append(e)
|
||||
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all
|
||||
# documents.
|
||||
# default_role = None
|
||||
|
@ -370,9 +371,9 @@ def setup(app):
|
|||
app.config.breathe_projects = {"esp32-idf": os.path.join(app.config.build_dir, "xml_in/")}
|
||||
app.config.breathe_default_project = "esp32-idf"
|
||||
|
||||
|
||||
setup_diag_font(app)
|
||||
|
||||
|
||||
def setup_diag_font(app):
|
||||
# blockdiag and other tools require a font which supports their character set
|
||||
# the font file is stored on the download server to save repo size
|
||||
|
|
|
@ -5,10 +5,10 @@ TOOLCHAIN_NAMES = {'esp32': 'esp', 'esp32s2': 'esp32s2'}
|
|||
CONFIG_PREFIX = {'esp32': 'ESP32', 'esp32s2': 'ESP32S2'}
|
||||
|
||||
TRM_EN_URL = {'esp32': 'https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf',
|
||||
'esp32s2': 'https://www.espressif.com/sites/default/files/documentation/esp32-s2_technical_reference_manual_en.pdf'}
|
||||
'esp32s2': 'https://www.espressif.com/sites/default/files/documentation/esp32-s2_technical_reference_manual_en.pdf'}
|
||||
|
||||
TRM_CN_URL = {'esp32': 'https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_cn.pdf',
|
||||
'esp32s2': 'https://www.espressif.com/sites/default/files/documentation/esp32-s2_technical_reference_manual_cn.pdf'}
|
||||
'esp32s2': 'https://www.espressif.com/sites/default/files/documentation/esp32-s2_technical_reference_manual_cn.pdf'}
|
||||
|
||||
|
||||
class StringSubstituter:
|
||||
|
|
|
@ -3,6 +3,7 @@ from __future__ import print_function
|
|||
import os.path
|
||||
from util import copy_if_modified, call_with_python
|
||||
|
||||
|
||||
def setup(app):
|
||||
# we don't actually need idf-info, just a convenient event to trigger this on
|
||||
app.connect('idf-info', generate_idf_tools_links)
|
||||
|
|
|
@ -10,7 +10,6 @@ import sys
|
|||
import os
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
from conf_common import * # noqa: F401, F403 - need to make available everything from common
|
||||
from idf_extensions.util import download_file_if_missing # noqa: E402 - need to import from common folder
|
||||
|
||||
# General information about the project.
|
||||
project = u'ESP-IDF 编程指南'
|
||||
|
|
Ładowanie…
Reference in New Issue