diff options
| author | Robert Honz <exislow+github@gmail.com> | 2024-01-13 12:04:35 +0100 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2024-01-13 12:04:35 +0100 |
| commit | dd8833add888412ff192d9a61466c8c16c3939e2 (patch) | |
| tree | 01115ca23e41ab02e0f36d0857cd83b5bef489e6 /tidal_dl_ng/helper/format.py | |
| parent | 14483a162949dcdffc1fe36b5c4962f1926beaa3 (diff) | |
| download | tidal-dl-ng-dd8833add888412ff192d9a61466c8c16c3939e2.tar.gz | |
♻️ Refactored linter warnings.
Diffstat (limited to 'tidal_dl_ng/helper/format.py')
| -rw-r--r-- | tidal_dl_ng/helper/format.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tidal_dl_ng/helper/format.py b/tidal_dl_ng/helper/format.py index ab62a69..f71b28d 100644 --- a/tidal_dl_ng/helper/format.py +++ b/tidal_dl_ng/helper/format.py @@ -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 |
