Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
goanpeca committed Jun 1, 2021
1 parent d460937 commit 7f9b5ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion napari/utils/settings/_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from ..theme import available_themes
from ..translations import _load_language, get_language_packs, trans


class SchemaVersion(str):
"""
Custom schema version type to handle both tuples and version strings.
Expand Down Expand Up @@ -233,7 +234,12 @@ class Config:
_env_settings: Optional[SettingsSourceCallable] = None

@classmethod
def customise_sources(cls, init_settings: SettingsSourceCallable, env_settings: SettingsSourceCallable, file_secret_settings: SettingsSourceCallable):
def customise_sources(
cls,
init_settings: SettingsSourceCallable,
env_settings: SettingsSourceCallable,
file_secret_settings: SettingsSourceCallable,
):
cls._env_settings = env_settings
return (
init_settings,
Expand Down
4 changes: 3 additions & 1 deletion napari/utils/settings/_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ def _load(self):
model = setting()
model.events.connect(lambda x: self._save())
self._settings[section] = model
self._env_settings[section] = getattr(model.__config__, "_env_settings")(model)
self._env_settings[section] = getattr(
model.__config__, "_env_settings"
)(model)

self._save()

Expand Down

0 comments on commit 7f9b5ee

Please sign in to comment.