-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* improved edge case handling During the integration in edgy some edge cases were found which are now handled better. It affects only cases where settings are disabled or unset or the evaluated names are unset.
- Loading branch information
Showing
11 changed files
with
187 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# SPDX-FileCopyrightText: 2024-present alex <[email protected]> | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clauses | ||
__version__ = "0.2.1" | ||
__version__ = "0.2.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from monkay import Monkay | ||
|
||
extras = {"foo": lambda: "foo"} | ||
|
||
|
||
def __getattr__(name: str): | ||
try: | ||
return extras[name] | ||
except KeyError as exc: | ||
raise AttributeError from exc | ||
|
||
|
||
class FakeApp: | ||
is_fake_app: bool = True | ||
|
||
|
||
__all__ = ["foo"] # noqa | ||
monkay = Monkay( | ||
globals(), | ||
with_extensions=True, | ||
with_instance=True, | ||
settings_path=False, | ||
lazy_imports={ | ||
"bar": ".fn_module:bar", | ||
"bar2": "..targets.fn_module:bar2", | ||
"dynamic": lambda: "dynamic", | ||
"settings": lambda: monkay.settings, | ||
}, | ||
deprecated_lazy_imports={ | ||
"deprecated": { | ||
"path": "tests.targets.fn_module:deprecated", | ||
"reason": "old.", | ||
"new_attribute": "super_new", | ||
} | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from monkay import Monkay | ||
|
||
extras = {"foo": lambda: "foo"} | ||
|
||
|
||
def __getattr__(name: str): | ||
try: | ||
return extras[name] | ||
except KeyError as exc: | ||
raise AttributeError from exc | ||
|
||
|
||
class FakeApp: | ||
is_fake_app: bool = True | ||
|
||
|
||
__all__ = ["foo"] # noqa | ||
monkay = Monkay( | ||
globals(), | ||
with_extensions=True, | ||
with_instance=True, | ||
settings_path="tests.targets.not_existing_settings_path:Settings", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from monkay import Monkay | ||
|
||
extras = {"foo": lambda: "foo"} | ||
|
||
|
||
def __getattr__(name: str): | ||
try: | ||
return extras[name] | ||
except KeyError as exc: | ||
raise AttributeError from exc | ||
|
||
|
||
class FakeApp: | ||
is_fake_app: bool = True | ||
|
||
|
||
__all__ = ["foo"] # noqa | ||
monkay = Monkay( | ||
globals(), | ||
with_extensions=True, | ||
with_instance=True, | ||
settings_path="tests.targets.not_existing_settings_path:Settings", | ||
settings_preloads_name="preloads", | ||
settings_extensions_name="extensions", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters