You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"So this tuple type totally works and is very usable, but you might consider implementing a config class to hold all of these in a named way. That might look something like this:
from dataclasses import dataclass
@dataclass
class ScraperConfig:
ms_wait: Optional[int] = None
start_date: str | None = None # this is an alternate way to do the type btw, some people prefer it. Optonal[T] == T | None
end_date: str | None = None
...
Then you can use it like my_config = Config(ms_wait=100, end_date='2024-01-01', ...) and access the fields like my_config.ms_wait"
The text was updated successfully, but these errors were encountered:
Recommended and quoted from Matt on #141:
"So this tuple type totally works and is very usable, but you might consider implementing a config class to hold all of these in a named way. That might look something like this:
Then you can use it like my_config = Config(ms_wait=100, end_date='2024-01-01', ...) and access the fields like my_config.ms_wait"
The text was updated successfully, but these errors were encountered: