Skip to content

Commit 9b3eb0b

Browse files
committed
git subrepo pull uno
subrepo: subdir: "uno" merged: "52436ae4" upstream: origin: "https://github.com/prrvchr/uno.git" branch: "main" commit: "52436ae4" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596"
1 parent 0443efe commit 9b3eb0b

35 files changed

+3449
-1552
lines changed

uno/.gitrepo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[subrepo]
77
remote = https://github.com/prrvchr/uno.git
88
branch = main
9-
commit = a9a170b79e15678fa87a482dcf5092a65a1dac3c
10-
parent = fd8c3fe1c7229fd9b4fb05ff0c5f7e1aab447ebd
9+
commit = 52436ae4ff61b0f9f68deacd3d659064622fdba2
10+
parent = 0443efed0f477f0466f0f5151ed544f215c127f2
1111
method = merge
1212
cmdver = 0.4.3

uno/lib/python/idna/core.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,11 @@ def valid_contextj(label: str, pos: int) -> bool:
150150
joining_type = idnadata.joining_types.get(ord(label[i]))
151151
if joining_type == ord('T'):
152152
continue
153-
if joining_type in [ord('L'), ord('D')]:
153+
elif joining_type in [ord('L'), ord('D')]:
154154
ok = True
155155
break
156+
else:
157+
break
156158

157159
if not ok:
158160
return False
@@ -162,9 +164,11 @@ def valid_contextj(label: str, pos: int) -> bool:
162164
joining_type = idnadata.joining_types.get(ord(label[i]))
163165
if joining_type == ord('T'):
164166
continue
165-
if joining_type in [ord('R'), ord('D')]:
167+
elif joining_type in [ord('R'), ord('D')]:
166168
ok = True
167169
break
170+
else:
171+
break
168172
return ok
169173

170174
if cp_value == 0x200d:
@@ -236,12 +240,8 @@ def check_label(label: Union[str, bytes, bytearray]) -> None:
236240
if intranges_contain(cp_value, idnadata.codepoint_classes['PVALID']):
237241
continue
238242
elif intranges_contain(cp_value, idnadata.codepoint_classes['CONTEXTJ']):
239-
try:
240-
if not valid_contextj(label, pos):
241-
raise InvalidCodepointContext('Joiner {} not allowed at position {} in {}'.format(
242-
_unot(cp_value), pos+1, repr(label)))
243-
except ValueError:
244-
raise IDNAError('Unknown codepoint adjacent to joiner {} at position {} in {}'.format(
243+
if not valid_contextj(label, pos):
244+
raise InvalidCodepointContext('Joiner {} not allowed at position {} in {}'.format(
245245
_unot(cp_value), pos+1, repr(label)))
246246
elif intranges_contain(cp_value, idnadata.codepoint_classes['CONTEXTO']):
247247
if not valid_contexto(label, pos):
@@ -262,13 +262,8 @@ def alabel(label: str) -> bytes:
262262
except UnicodeEncodeError:
263263
pass
264264

265-
if not label:
266-
raise IDNAError('No Input')
267-
268-
label = str(label)
269265
check_label(label)
270-
label_bytes = _punycode(label)
271-
label_bytes = _alabel_prefix + label_bytes
266+
label_bytes = _alabel_prefix + _punycode(label)
272267

273268
if not valid_label_length(label_bytes):
274269
raise IDNAError('Label too long')

0 commit comments

Comments
 (0)