mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 01:17:35 -02:30
fix: compatibility with black v25+ (#15789)
This commit is contained in:
@@ -266,9 +266,9 @@ def random_utf8(*args, **kwargs):
|
||||
exception when a character outside of the BMP is sent to `send_keys`.
|
||||
Code pulled from http://stackoverflow.com/a/3220210.
|
||||
"""
|
||||
pattern = re.compile('[^\u0000-\uD7FF\uE000-\uFFFF]', re.UNICODE)
|
||||
pattern = re.compile('[^\u0000-\ud7ff\ue000-\uffff]', re.UNICODE)
|
||||
length = args[0] if len(args) else kwargs.get('length', 10)
|
||||
scrubbed = pattern.sub('\uFFFD', ''.join([gen_utf_char() for _ in range(length)]))
|
||||
scrubbed = pattern.sub('\ufffd', ''.join([gen_utf_char() for _ in range(length)]))
|
||||
|
||||
return scrubbed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user