PyAPI: make internal modules explicitly "private"
Rename modules in `./scripts/modules/` to use an underscore prefix to make it clear they aren't intended to be part of public API's. This also means there is no implication that these modules should be stable, allowing us to change them based on Blender's internal usage. The following modules have been marked as private: - `animsys_refactor` - `bl_console_utils` - `bl_i18n_utils` - `bl_previews_utils` - `bl_rna_utils` - `bl_text_utils` - `bl_ui_utils` - `bpy_restrict_state` - `console_python` - `console_shell` - `graphviz_export` - `keyingsets_utils` - `rna_info` - `rna_manual_reference` - `rna_xml` Note that we could further re-arrange these modules (under `_bpy_internal` in some cases), this change is mainly to mark them as private, further changes can be handed on a case-by-case basis. Ref !147773
This commit is contained in:
@@ -92,7 +92,7 @@ DUPLICATE_IGNORE = {
|
||||
|
||||
|
||||
def check_duplicates():
|
||||
import rna_info
|
||||
import _rna_info as rna_info
|
||||
|
||||
DUPLICATE_IGNORE_FOUND = set()
|
||||
DUPLICATE_ACCEPT_FOUND = set()
|
||||
|
||||
@@ -907,7 +907,7 @@ dict_ignore_hyphenated_suffix = {
|
||||
}
|
||||
|
||||
files_ignore = {
|
||||
"scripts/modules/bl_i18n_utils/utils_spell_check.py", # UI spelling, doesn't always match code spelling.
|
||||
"scripts/modules/_bl_i18n_utils/utils_spell_check.py", # UI spelling, doesn't always match code spelling.
|
||||
"tools/utils/git_data_canonical_authors.py", # Too many names which aren't in the dictionary.
|
||||
"tools/utils_doc/rna_manual_reference_updater.py", # Contains language ID references.
|
||||
|
||||
|
||||
@@ -40,6 +40,6 @@ PATHS_EXCLUDE: set[str] = set(
|
||||
"tools/svn_rev_map/sha1_to_rev.py",
|
||||
"tools/svn_rev_map/rev_to_sha1.py",
|
||||
"tools/svn_rev_map/rev_to_sha1.py",
|
||||
"scripts/modules/rna_manual_reference.py",
|
||||
"scripts/modules/_rna_manual_reference.py",
|
||||
)
|
||||
)
|
||||
|
||||
@@ -142,7 +142,7 @@ def main():
|
||||
parser.add_argument(
|
||||
"--output",
|
||||
dest="output",
|
||||
default=os.path.join(BASE_DIR, "scripts", "modules", "rna_manual_reference.py"),
|
||||
default=os.path.join(BASE_DIR, "scripts", "modules", "_rna_manual_reference.py"),
|
||||
required=False,
|
||||
help="path to output including filename and extentsion",
|
||||
metavar="FILE")
|
||||
|
||||
@@ -46,7 +46,7 @@ extensions = (
|
||||
)
|
||||
|
||||
ignore_files = {
|
||||
"scripts/modules/rna_manual_reference.py", # Large generated file, don't format.
|
||||
"scripts/modules/_rna_manual_reference.py", # Large generated file, don't format.
|
||||
"tools/svn_rev_map/rev_to_sha1.py",
|
||||
"tools/svn_rev_map/sha1_to_rev.py",
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import os
|
||||
|
||||
|
||||
def update(filepath):
|
||||
import rna_xml
|
||||
import _rna_xml as rna_xml
|
||||
context = bpy.context
|
||||
|
||||
print("Updating theme: {!r}".format(filepath))
|
||||
|
||||
Reference in New Issue
Block a user