kopia lustrzana https://github.com/bugout-dev/moonstream
Merge pull request #26 from zomglings/fix-subscription-mypy-error
Fixed small mypy issue when working with application_idnew-indices
commit
d1bd4dc728
|
@ -99,7 +99,6 @@ async def add_subscription_handler(
|
|||
resource_data.update(subscription_data)
|
||||
|
||||
try:
|
||||
|
||||
resource: BugoutResource = bc.create_resource(
|
||||
token=token,
|
||||
application_id=MOONSTREAM_APPLICATION_ID,
|
||||
|
|
|
@ -5,8 +5,9 @@ from bugout.app import Bugout
|
|||
# Bugout
|
||||
bugout_client = Bugout()
|
||||
|
||||
MOONSTREAM_APPLICATION_ID = os.environ.get("MOONSTREAM_APPLICATION_ID")
|
||||
if MOONSTREAM_APPLICATION_ID is None:
|
||||
# Default value is "" instead of None so that mypy understands that MOONSTREAM_APPLICATION_ID is a string
|
||||
MOONSTREAM_APPLICATION_ID = os.environ.get("MOONSTREAM_APPLICATION_ID", "")
|
||||
if MOONSTREAM_APPLICATION_ID == "":
|
||||
raise ValueError("MOONSTREAM_APPLICATION_ID environment variable must be set")
|
||||
|
||||
MOONSTREAM_DATA_JOURNAL_ID = os.environ.get("MOONSTREAM_DATA_JOURNAL_ID")
|
||||
|
|
Ładowanie…
Reference in New Issue