1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-15 01:24:29 +02:00

add docstring

This commit is contained in:
Kelly Brazil
2020-06-14 17:23:10 -07:00
parent cc0f0971d7
commit d0d7254c6a
2 changed files with 26 additions and 0 deletions

View File

@ -48,3 +48,18 @@ Returns:
no return, just prints output to STDERR
## has_data
```python
has_data(data)
```
Checks if the input contains data. If there are any non-whitespace characters then return True, else return False
Parameters:
data: (string) input to check whether it contains data
Returns:
Boolean True if input string (data) contains non-whitespace characters, otherwise False

View File

@ -70,4 +70,15 @@ def compatibility(mod_name, compatible):
def has_data(data):
"""
Checks if the input contains data. If there are any non-whitespace characters then return True, else return False
Parameters:
data: (string) input to check whether it contains data
Returns:
Boolean True if input string (data) contains non-whitespace characters, otherwise False
"""
return True if data and not data.isspace() else False