diff --git a/.gitignore b/.gitignore index 161ec36..3e2c686 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ nostr.egg-info/ dist/ nostr/_version.py .DS_Store +.python-version \ No newline at end of file diff --git a/nostr/event.py b/nostr/event.py index ce77050..8edba87 100644 --- a/nostr/event.py +++ b/nostr/event.py @@ -23,7 +23,7 @@ def __init__( content: str, created_at: int = None, kind: int=EventKind.TEXT_NOTE, - tags: "list[list[str]]"=[], + tags: "list[list[str]]" = None, id: str=None, signature: str=None) -> None: if not isinstance(content, str): @@ -33,7 +33,7 @@ def __init__( self.content = content self.created_at = created_at or int(time.time()) self.kind = kind - self.tags = tags + self.tags = tags or [] self.signature = signature self.id = id or Event.compute_id(self.public_key, self.created_at, self.kind, self.tags, self.content)