From 766b4d5512e993499b13d555c2be214bb3744017 Mon Sep 17 00:00:00 2001 From: Ben Hovinga <23349127+benhovinga@users.noreply.github.com> Date: Sat, 20 Jan 2024 19:49:06 -0330 Subject: [PATCH] improved remove_all_before() docstring --- aamva_standard/barcode.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/aamva_standard/barcode.py b/aamva_standard/barcode.py index 925ad66..eed30cc 100644 --- a/aamva_standard/barcode.py +++ b/aamva_standard/barcode.py @@ -15,7 +15,16 @@ def header_length(version: int) -> int: def remove_all_before(_str: str, indicator: str) -> str: - """Removes all characters before the indicator in a string""" + """ + Removes all characters before the indicator in a string + + Example: + + remove_all_before("abc@123", "@") + returns: "@123" + + Raises a ValueError if the indicator is not found in the string. + """ if _str[0] != indicator: try: index = _str.index(indicator)