Skip to content

Using attribute access to Config leads to mypy errors #51337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gsnedders opened this issue Mar 13, 2025 · 0 comments
Open

Using attribute access to Config leads to mypy errors #51337

gsnedders opened this issue Mar 13, 2025 · 0 comments

Comments

@gsnedders
Copy link
Member

The docstring implies attributes are the preferred way to access the config:

Inherits from Mapping for backwards compatibility with the old dict-based config

However, doing this leads to mypy errors like:

tools/serve/dns.py:99: error: "Config" has no attribute "all_domains_set"  [attr-defined]

We presumably need to actually provide types for what we believe the config should be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant