♻️ Refactored linter warnings.
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
def is_xml(value: str) -> bool:
|
||||
result = False
|
||||
|
||||
if value:
|
||||
if value.startswith("<?xml"):
|
||||
result = True
|
||||
if value and value.startswith("<?xml"):
|
||||
result = True
|
||||
|
||||
return result
|
||||
|
||||
@@ -11,8 +10,7 @@ def is_xml(value: str) -> bool:
|
||||
def is_json(value: str) -> bool:
|
||||
result = False
|
||||
|
||||
if value:
|
||||
if value.startswith("{"):
|
||||
result = True
|
||||
if value and value.startswith("{"):
|
||||
result = True
|
||||
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user