Skip to content

Commit

Permalink
Fix Annotations
Browse files Browse the repository at this point in the history
Fix annotations and Remove unused annotations
  • Loading branch information
daklauss committed Dec 6, 2024
1 parent 5849496 commit 9f41139
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions CADETProcess/processModel/componentSystem.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from collections import defaultdict
from functools import wraps
from typing import Optional, Union, List, Dict as TypingDict
from typing import List, Dict as TypingDict

from addict import Dict

Expand Down Expand Up @@ -212,11 +212,33 @@ def __init__(
self,
components: int | List[str | Component | None] = None,
name: str | None = None,
charges: List[int | None | None] = None,
molecular_weights: List[float | None | None] = None,
densities: List[float | None | None] = None
charges: List[int | None] = None,
molecular_weights: List[float | None] = None,
densities: List[float | None] = None
) -> None:
"""Initialize the ComponentSystem object."""
"""Initialize the ComponentSystem object.
Parameters
----------
components : int, list, None
The number of components or the list of components to be added.
If None, no components are added.
name : str, None
The name of the ComponentSystem.
charges : list, None
The charges of each component.
molecular_weights : list, None
The molecular weights of each component.
densities : list, None
The densities of each component.
Raises
------
CADETProcessError
If the `components` argument is neither an int nor a list.
"""

self.name: str | None = name
self._components: List[Component] = []

Expand Down Expand Up @@ -278,8 +300,8 @@ def n_species(self) -> int:
def add_component(
self,
component: str | Component,
*args: int | float | None,
**kwargs: int | float | None
*args: list,
**kwargs: dict
) -> None:
"""
Add a component to the system.
Expand Down

0 comments on commit 9f41139

Please sign in to comment.