Skip to content

Instantly share code, notes, and snippets.

@ShahriyarR
Created December 6, 2022 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShahriyarR/ce814aa50bf203a6300217b06367ac6e to your computer and use it in GitHub Desktop.
Save ShahriyarR/ce814aa50bf203a6300217b06367ac6e to your computer and use it in GitHub Desktop.
from readonce import ReadOnce
from dataclasses import dataclass
@dataclass
class DBPassword(ReadOnce):
password: str
def __post_init__(self):
# This is going to fail with "AttributeError: 'DBPassword' object has no attribute 'password'"
self.add_secret(self.password)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment