mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Update client/ayon_core/lib/path_templates.py
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
This commit is contained in:
parent
eaa1b503b7
commit
44c417fdb0
1 changed files with 10 additions and 7 deletions
|
|
@ -462,14 +462,17 @@ class FormattingPart:
|
|||
|
||||
@staticmethod
|
||||
def validate_key_is_matched(key):
|
||||
"""
|
||||
Finds out how balanced an expression is.
|
||||
With a string containing only brackets.
|
||||
"""Validate that opening has closing at correct place.
|
||||
|
||||
Example:
|
||||
>>> is_matched("[]()()(((([])))")
|
||||
False
|
||||
>>> is_matched("[](){{{[]}}}")
|
||||
True
|
||||
|
||||
Returns:
|
||||
bool: Openings and closinga are valid.
|
||||
|
||||
>>> is_matched('[]()()(((([])))')
|
||||
False
|
||||
>>> is_matched('[](){{{[]}}}')
|
||||
True
|
||||
"""
|
||||
opening = tuple('({[')
|
||||
closing = tuple(')}]')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue