mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-29 08:01:02 +03:00
fix: normalize d5p1 namespace in info scripts and fix Python IndentationErrors
- meta-info, form-info (PS+PY): recognize dNpN: prefix alongside cfg: in type parsing - Fix module-level sys.stderr.reconfigure indentation in 9 Python scripts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
fde6d346d7
commit
872675652f
@@ -223,6 +223,8 @@ function Format-SingleType([string]$raw, $parentNode) {
|
||||
"v8:UUID" { return "УникальныйИдентификатор" }
|
||||
"v8:Null" { return "Null" }
|
||||
default {
|
||||
# Normalize d5p1:/dNpN: -> cfg:
|
||||
$raw = $raw -replace '^d\d+p\d+:', 'cfg:'
|
||||
# cfg:CatalogRef.Xxx -> СправочникСсылка.Xxx
|
||||
if ($raw -match '^cfg:(\w+)Ref\.(.+)$') {
|
||||
$prefix = "$($Matches[1])Ref"
|
||||
@@ -356,6 +358,7 @@ function Decline-Cols([int]$n) {
|
||||
}
|
||||
|
||||
function Format-SourceType([string]$raw) {
|
||||
$raw = $raw -replace '^d\d+p\d+:', 'cfg:'
|
||||
if ($raw -match '^cfg:(\w+)\.(.+)$') {
|
||||
$prefix = $Matches[1]; $name = $Matches[2]
|
||||
if ($objectTypeMap.ContainsKey($prefix)) { return "$($objectTypeMap[$prefix]).$name" }
|
||||
|
||||
@@ -8,7 +8,7 @@ import sys
|
||||
from lxml import etree
|
||||
|
||||
sys.stdout.reconfigure(encoding="utf-8")
|
||||
sys.stderr.reconfigure(encoding="utf-8")
|
||||
sys.stderr.reconfigure(encoding="utf-8")
|
||||
|
||||
# ── arg parsing ──────────────────────────────────────────────
|
||||
|
||||
@@ -282,6 +282,8 @@ def format_single_type(raw, parent_node):
|
||||
return "УникальныйИдентификатор"
|
||||
if raw == "v8:Null":
|
||||
return "Null"
|
||||
# Normalize d5p1:/dNpN: → cfg: (both map to same namespace)
|
||||
raw = re.sub(r'^d\d+p\d+:', 'cfg:', raw)
|
||||
# cfg:CatalogRef.Xxx -> СправочникСсылка.Xxx
|
||||
m = re.match(r'^cfg:(\w+)Ref\.(.+)$', raw)
|
||||
if m:
|
||||
@@ -410,6 +412,7 @@ def decline_cols(n):
|
||||
|
||||
|
||||
def format_source_type(raw):
|
||||
raw = re.sub(r'^d\d+p\d+:', 'cfg:', raw)
|
||||
m = re.match(r'^cfg:(\w+)\.(.+)$', raw)
|
||||
if m:
|
||||
prefix = m.group(1)
|
||||
|
||||
Reference in New Issue
Block a user