forked from bartvdbraak/blender
rename wiki -> manual
This commit is contained in:
parent
9927849708
commit
99fba34b8d
@ -641,10 +641,10 @@ def unregister_module(module, verbose=False):
|
|||||||
# we start with the built-in default mapping
|
# we start with the built-in default mapping
|
||||||
def _blender_default_map():
|
def _blender_default_map():
|
||||||
import sys
|
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)
|
ret = (ref_mod.url_manual_prefix, ref_mod.url_manual_mapping)
|
||||||
# avoid storing in memory
|
# avoid storing in memory
|
||||||
del sys.modules["rna_wiki_reference"]
|
del sys.modules["rna_manual_reference"]
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
# hooks for doc lookups
|
# hooks for doc lookups
|
||||||
|
@ -974,8 +974,10 @@ class WM_OT_doc_view_manual(Operator):
|
|||||||
url = self._lookup_rna_url(rna_id)
|
url = self._lookup_rna_url(rna_id)
|
||||||
|
|
||||||
if url is None:
|
if url is None:
|
||||||
self.report({'WARNING'}, "No reference available %r, "
|
self.report(
|
||||||
"Update info in 'rna_wiki_reference.py' "
|
{'WARNING'},
|
||||||
|
"No reference available %r, "
|
||||||
|
"Update info in 'rna_manual_reference.py' "
|
||||||
"or callback to bpy.utils.manual_map()" %
|
"or callback to bpy.utils.manual_map()" %
|
||||||
self.doc_id)
|
self.doc_id)
|
||||||
return {'CANCELLED'}
|
return {'CANCELLED'}
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
|
|
||||||
# <pep8 compliant>
|
# <pep8 compliant>
|
||||||
|
|
||||||
# Use for validating our wiki interlinking.
|
# Use for validating our manual interlinking.
|
||||||
# ./blender.bin --background -noaudio --python tests/python/bl_rna_wiki_reference.py
|
# ./blender.bin --background -noaudio --python tests/python/bl_rna_manual_reference.py
|
||||||
#
|
#
|
||||||
# 1) test_data() -- ensure the data we have is correct format
|
# 1) test_data() -- ensure the data we have is correct format
|
||||||
# 2) test_lookup_coverage() -- ensure that we have lookups for _every_ RNA path
|
# 2) test_lookup_coverage() -- ensure that we have lookups for _every_ RNA path
|
||||||
@ -31,10 +31,10 @@ import bpy
|
|||||||
|
|
||||||
|
|
||||||
def test_data():
|
def test_data():
|
||||||
import rna_wiki_reference
|
import rna_manual_reference
|
||||||
|
|
||||||
assert(isinstance(rna_wiki_reference.url_manual_mapping, tuple))
|
assert(isinstance(rna_manual_reference.url_manual_mapping, tuple))
|
||||||
for i, value in enumerate(rna_wiki_reference.url_manual_mapping):
|
for i, value in enumerate(rna_manual_reference.url_manual_mapping):
|
||||||
try:
|
try:
|
||||||
assert(len(value) == 2)
|
assert(len(value) == 2)
|
||||||
assert(isinstance(value[0], str))
|
assert(isinstance(value[0], str))
|
||||||
@ -94,7 +94,7 @@ def test_language_coverage():
|
|||||||
def test_urls():
|
def test_urls():
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import rna_wiki_reference
|
import rna_manual_reference
|
||||||
|
|
||||||
import urllib.error
|
import urllib.error
|
||||||
from urllib.request import urlopen
|
from urllib.request import urlopen
|
||||||
@ -102,9 +102,9 @@ def test_urls():
|
|||||||
# avoid URL lookups if possible
|
# avoid URL lookups if possible
|
||||||
LOCAL_PREFIX = os.environ.get("LOCAL_PREFIX")
|
LOCAL_PREFIX = os.environ.get("LOCAL_PREFIX")
|
||||||
if LOCAL_PREFIX is None:
|
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)
|
urls_len = "%d" % len(urls)
|
||||||
print("")
|
print("")
|
Loading…
Reference in New Issue
Block a user