Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Toml doesnt support None (#101)
Browse files Browse the repository at this point in the history
Replaced None value with blank str
  • Loading branch information
Buried-In-Code authored Feb 3, 2023
1 parent a6716a7 commit 8754b25
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions dex_starr/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
]

from pathlib import Path
from typing import ClassVar, List, Optional
from typing import ClassVar, List

from pydantic import BaseModel, Extra, Field, validator

Expand All @@ -31,23 +31,23 @@ class Config:

class MetronSettings(SettingsModel):
generate_metroninfo_file: bool = True
password: Optional[str] = None
username: Optional[str] = None
password: str = ""
username: str = ""


class MarvelSettings(SettingsModel):
public_key: Optional[str] = None
private_key: Optional[str] = None
public_key: str = ""
private_key: str = ""


class LeagueOfComicGeeksSettings(SettingsModel):
client_id: Optional[str] = None
client_secret: Optional[str] = None
access_token: Optional[str] = None
client_id: str = ""
client_secret: str = ""
access_token: str = ""


class ComicvineSettings(SettingsModel):
api_key: Optional[str] = None
api_key: str = ""


class GeneralSettings(SettingsModel):
Expand All @@ -66,7 +66,7 @@ def validate_output_format(cls, v):


class Settings(SettingsModel):
FILENAME: ClassVar = get_config_root() / "settings.toml"
FILENAME: ClassVar[str] = get_config_root() / "settings.toml"
general: GeneralSettings = GeneralSettings(
resolution_order=[
"Marvel",
Expand Down

0 comments on commit 8754b25

Please sign in to comment.