fixed parsing

This commit is contained in:
Hellow2
2023-06-13 13:29:24 +02:00
parent 500f82d079
commit 65f7121837
3 changed files with 12 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
from urllib.parse import urlparse
from urllib.parse import urlparse, ParseResult
import re
from .base_classes import Section, FloatAttribute, IntAttribute, BoolAttribute, ListAttribute, StringAttribute
@@ -26,8 +26,9 @@ class UrlStringAttribute(StringAttribute):
rule="has to be a valid url"
)
def single_object_from_element(self, value: str):
return urlparse(value)
@property
def object_from_value(self) -> ParseResult:
return urlparse(self.value)
class ConnectionSection(Section):