Skip to content

Commit

Permalink
[Definitions][Fixed] Empty definition handling
Browse files Browse the repository at this point in the history
Avoid interpreting them as the "None" string, now they are just None

See #757
  • Loading branch information
set-soft committed Jan 2, 2025
1 parent f9d09a8 commit 91d935f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- A mechanism to paste images from outputs (#714)

### Fixed
- Definitions: avoid interpreting empty definitions as the "None" string
(See #757)
- Guess for 3rd party dir: not just for v6
- SubParts filter:
- iBoM and Schematic print didn't take it into account (#716)
Expand Down
2 changes: 2 additions & 0 deletions docs/source/Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ Added
Fixed
~~~~~

- Definitions: avoid interpreting empty definitions as the “None”
string (See #757)
- Guess for 3rd party dir: not just for v6
- SubParts filter:

Expand Down
3 changes: 3 additions & 0 deletions kibot/config_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ def update_dict(d, u):
def do_replace(k, v, content, replaced):
key = '@'+k+'@'
if key in content:
# Handle empty definitions keeping YAML's "null"
if v is None:
v = 'null'
logger.debugl(2, '- Replacing {} -> {}'.format(key, v))
content = content.replace(key, str(v))
replaced = True
Expand Down

0 comments on commit 91d935f

Please sign in to comment.