-
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.
refactor: change to use 'schema' as variable name for cfg schema
BREAKING CHANGE: Now only initialised config can be imported as cfg
- Loading branch information
Artem Vasenin
committed
Jan 30, 2024
1 parent
f5d7a0c
commit 488109e
Showing
60 changed files
with
201 additions
and
214 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,6 +1,6 @@ | ||
from __future__ import annotations | ||
|
||
from pycs import CN | ||
from tests.data.bad.bad_inherit import cfg | ||
from tests.data.bad.bad_inherit import schema | ||
|
||
cfg = CN(cfg) | ||
cfg = CN(schema) |
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,8 +1,8 @@ | ||
from __future__ import annotations | ||
|
||
from ..base_cfg import cfg | ||
from ..base_cfg import schema | ||
from ..base_class import BaseClass | ||
|
||
cfg = cfg.clone() | ||
schema = schema.clone() | ||
|
||
cfg.CLASSES.ANOTHER = BaseClass | ||
schema.CLASSES.ANOTHER = BaseClass |
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,7 +1,7 @@ | ||
from __future__ import annotations | ||
|
||
from pycs import CN | ||
from tests.data.good.inheritance import cfg | ||
from tests.data.good.inheritance import schema | ||
|
||
cfg = CN(cfg) | ||
cfg = CN(schema) | ||
cfg.DICT.BAR = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
from __future__ import annotations | ||
|
||
from pycs import CL, CN | ||
from tests.data.base_cfg import cfg | ||
from tests.data.base_cfg import schema | ||
|
||
cfg = cfg.inherit() | ||
schema = schema.inherit() | ||
|
||
cfg.DESCRIBED = CL("described", desc="Described leaf") | ||
cfg.DESCRIBED_NESTING = CN(CL(str, desc="Described nesting")) | ||
schema.DESCRIBED = CL("described", desc="Described leaf") | ||
schema.DESCRIBED_NESTING = CN(CL(str, desc="Described nesting")) |
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,6 +1,6 @@ | ||
from __future__ import annotations | ||
|
||
from pycs import CN | ||
from tests.data.description.base import cfg | ||
from tests.data.description.base import schema | ||
|
||
cfg = CN(cfg) | ||
cfg = CN(schema) |
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,8 +1,8 @@ | ||
from __future__ import annotations | ||
|
||
from pycs import CN | ||
from tests.data.description.base import cfg | ||
from tests.data.description.base import schema | ||
|
||
cfg = CN(cfg) | ||
cfg = CN(schema) | ||
|
||
cfg.DESCRIBED = 1 |
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,9 +1,9 @@ | ||
from __future__ import annotations | ||
|
||
from pycs import CL, CN | ||
from tests.data.description.base import cfg | ||
from tests.data.description.base import schema | ||
|
||
cfg = CN(cfg) | ||
cfg = CN(schema) | ||
|
||
cfg.DESCRIBED_NESTING.FOO = "foo" | ||
cfg.DESCRIBED_NESTING.BAR = CL("bar", desc="Overrided description") |
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,8 +1,8 @@ | ||
from __future__ import annotations | ||
|
||
from pycs import CN | ||
from tests.data.description.base import cfg | ||
from tests.data.description.base import schema | ||
|
||
cfg = CN(cfg) | ||
cfg = CN(schema) | ||
|
||
cfg.DESCRIBED = "overrided" |
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,8 +1,8 @@ | ||
from __future__ import annotations | ||
|
||
from pycs import CN | ||
from tests.data.good.full_key_node_assign import cfg | ||
from tests.data.good.full_key_node_assign import schema | ||
|
||
cfg = CN(cfg) | ||
cfg = CN(schema) | ||
|
||
cfg.FOO.BAR = "foo" |
Oops, something went wrong.