Files
test/keywords/python/string.py
abhinav_ayyapasetti 1fabfc59ee pylint fix
Description:
- Added data types to function arguments and return values.
- Added blank lines between summary and description in docstrings to match style guidelines.
- Removed extra blank lines after docstrings.
- Added a missing import for SSHConnection in sma_keywords.py.
- Capitalized the first word in each docstring to comply with style guide rules.
- Improved docstring for PTP4LStatusObject constructor with detailed attribute descriptions

Change-Id: Idada0b0b0c3f895a16f4b439beaaaf071597a16a

Change-Id: I8e7756d32eb56a2aa85b277a91b26cc6280d1c56
Signed-off-by: aabhinav <ayyapasetti.abhinav@windriver.com>
2025-07-09 19:38:14 +00:00

20 lines
554 B
Python

class String:
"""
Class for utility methods on the Python str type.
"""
@staticmethod
def is_empty(some_string: str) -> bool:
"""
Checks if 'some_string' is an empty string.
An empty string is either a sequence with zero characters or one that consists only of space characters.
Args:
some_string (str): the string to be checked.
Returns:
bool: True if 'some_string' is empty, False otherwise.
"""
return not some_string or some_string.strip() == ""