Skip to content

feat: check non-exists attrs - #6

Merged
Randomizez merged 1 commit into
masterfrom
add-non-exists-check
Jan 27, 2026
Merged

Randomizez merged 1 commit into
masterfrom
add-non-exists-check

Conversation

@Randomizez

Copy link
Copy Markdown
Owner
  • sanity_check will fail if attrs annotation given but not actually set. e.g.
  • Optinal type hint will be ignored
class A(Config):
  a: str

A().sanity_check() # raise AttributeError

class B(Config):
  b: Optional[str]

B().sanity_check() # OK
  • warn if use Config(a=a)

@Randomizez
Randomizez merged commit 8a85da8 into master Jan 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant