Skip to content

Add constants#54

Draft
MatthewFlamm wants to merge 8 commits intomasterfrom
add-constants
Draft

Add constants#54
MatthewFlamm wants to merge 8 commits intomasterfrom
add-constants

Conversation

@MatthewFlamm
Copy link
Owner

@MatthewFlamm MatthewFlamm commented Sep 26, 2021

Make it easier too use constants in downstream applications.

Closes #57

"blizzard": "Blizzard",
"fog": "Fog/mist",
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use strEnum for these, too.

from .const import (
ALERT_ID,
API_WEATHER_CODE,
OBS_BARO_PRESSURE,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using strEnum eliminates the need to import the values separately.

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.

Use constants instead of strings for downstream use

2 participants