Skip to content

Commit

Permalink
Add from_external_repository attribute to Code (#459)
Browse files Browse the repository at this point in the history
* Rename repository attribute in Code

* Revert "Rename repository attribute in Code"

This reverts commit 066c805.

* Add external repo property
  • Loading branch information
dc-almeida authored Jan 30, 2025
1 parent d400ac5 commit 4456054
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nomenclature/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ def flattened_dict_serialized(self):
def depth(self) -> int:
return self.name.count("|")

@property
def from_external_repository(self) -> bool:
return self.repository is not None

def replace_tag(self, tag: str, target: "Code") -> "Code":
"""Return a new instance with tag applied
Expand Down

0 comments on commit 4456054

Please sign in to comment.