Skip to content

Commit

Permalink
chore: formatting and spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
sstroemer committed Nov 21, 2024
1 parent 47cbe9c commit 60b0a05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/pages/dev/updating.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Everything that was previously part of `IESoptLib.jl` is now integrated into `IE

#### Tags

Compontent "tags" are back (or accessible again, they were never gone completely). That means you can tag components to later simplify result handling or working with your model. A tag can be added when creating a component:
Component "tags" are back (or accessible again, they were never gone completely). That means you can tag components to later simplify result handling or working with your model. A tag can be added when creating a component:

```{code-block} yaml
:caption: Adding a tag.
Expand Down
8 changes: 4 additions & 4 deletions src/iesopt/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,17 @@ def get_component(self, component: str):
return self._IESopt.get_component(self.core, component)
except Exception:
raise Exception(f"Error while retrieving component `{component}` from model")
def get_components(self, tagged = None):

def get_components(self, tagged=None):
"""
Get all components of the model, possibly filtered by (a) tag(s).
Arguments:
tagged (str or list of str): The tag(s) to filter the components by, can be `None` (default) to get all components.
"""
if tagged is None:
return self._IESopt.get_components(self.core)

return self._IESopt.get_components(self.core, recursive_convert_py2jl(tagged))

def get_variable(self, component: str, variable: str):
Expand Down

0 comments on commit 60b0a05

Please sign in to comment.