-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Metadata API: Don't do equality comparisons on containers
Use either "if X is not None:" or a try-except instead of a "if X:". I believe Targets.from_dict() was not really broken with previous code but it looks suspicious and did fail the added test with a strange exception: I expect the from_dict() methods to mainly fail with KeyErrors and ValueErrors if file format structure is incorrect. Signed-off-by: Jussi Kukkonen <[email protected]>
- Loading branch information
Jussi Kukkonen
committed
May 14, 2021
1 parent
aa480b1
commit 73a8f24
Showing
2 changed files
with
15 additions
and
4 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