Explicitly mark arguments as optional

mypy now considers implicitly Optional arguments
to be errors - I have made them now explicitly
Optional, which passes.
This commit is contained in:
Richard Bowman 2023-03-21 15:04:49 +00:00
parent ba62bdf867
commit 8e50a90fb2
3 changed files with 8 additions and 6 deletions

View file

@ -3,6 +3,8 @@ import json
import logging
import os
import shutil
from typing import Optional
from .json import JSONEncoder
from .paths import CONFIGURATION_FILE_PATH, SETTINGS_FILE_PATH
@ -17,7 +19,7 @@ class OpenflexureSettingsFile:
expand (bool): Expand paths to valid auxillary config files.
"""
def __init__(self, path: str, defaults: dict = None):
def __init__(self, path: str, defaults: Optional[dict] = None):
defaults = defaults or {}
# Set arguments