rename wiki -> manual

This commit is contained in:
Campbell Barton 2015-06-08 11:33:03 +10:00
parent 9927849708
commit 99fba34b8d
Notes: blender-bot 2023-02-21 17:59:30 +01:00
Referenced by issue #45002, sculpt show brush toggle no longer working
3 changed files with 16 additions and 14 deletions

View File

@ -641,10 +641,10 @@ def unregister_module(module, verbose=False):
# we start with the built-in default mapping
def _blender_default_map():
import sys
import rna_wiki_reference as ref_mod
import rna_manual_reference as ref_mod
ret = (ref_mod.url_manual_prefix, ref_mod.url_manual_mapping)
# avoid storing in memory
del sys.modules["rna_wiki_reference"]
del sys.modules["rna_manual_reference"]
return ret
# hooks for doc lookups

View File

@ -974,10 +974,12 @@ class WM_OT_doc_view_manual(Operator):
url = self._lookup_rna_url(rna_id)
if url is None:
self.report({'WARNING'}, "No reference available %r, "
"Update info in 'rna_wiki_reference.py' "
" or callback to bpy.utils.manual_map()" %
self.doc_id)
self.report(
{'WARNING'},
"No reference available %r, "
"Update info in 'rna_manual_reference.py' "
"or callback to bpy.utils.manual_map()" %
self.doc_id)
return {'CANCELLED'}
else:
import webbrowser

View File

@ -18,8 +18,8 @@
# <pep8 compliant>
# Use for validating our wiki interlinking.
# ./blender.bin --background -noaudio --python tests/python/bl_rna_wiki_reference.py
# Use for validating our manual interlinking.
# ./blender.bin --background -noaudio --python tests/python/bl_rna_manual_reference.py
#
# 1) test_data() -- ensure the data we have is correct format
# 2) test_lookup_coverage() -- ensure that we have lookups for _every_ RNA path
@ -31,10 +31,10 @@ import bpy
def test_data():
import rna_wiki_reference
import rna_manual_reference
assert(isinstance(rna_wiki_reference.url_manual_mapping, tuple))
for i, value in enumerate(rna_wiki_reference.url_manual_mapping):
assert(isinstance(rna_manual_reference.url_manual_mapping, tuple))
for i, value in enumerate(rna_manual_reference.url_manual_mapping):
try:
assert(len(value) == 2)
assert(isinstance(value[0], str))
@ -94,7 +94,7 @@ def test_language_coverage():
def test_urls():
import os
import sys
import rna_wiki_reference
import rna_manual_reference
import urllib.error
from urllib.request import urlopen
@ -102,9 +102,9 @@ def test_urls():
# avoid URL lookups if possible
LOCAL_PREFIX = os.environ.get("LOCAL_PREFIX")
if LOCAL_PREFIX is None:
prefix = rna_wiki_reference.url_manual_prefix
prefix = rna_manual_reference.url_manual_prefix
urls = {suffix for (rna_id, suffix) in rna_wiki_reference.url_manual_mapping}
urls = {suffix for (rna_id, suffix) in rna_manual_reference.url_manual_mapping}
urls_len = "%d" % len(urls)
print("")