Skip to content

Commit

Permalink
Merge pull request #56 from pyansys/fix/remove-todos
Browse files Browse the repository at this point in the history
Remove obsolete TODOs.
  • Loading branch information
Andy-Grigg authored Jan 17, 2022
2 parents 27b9eec + f9640d9 commit 62095b1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/ansys/grantami/bomanalytics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
from ._exceptions import GrantaMIException

__version__ = "0.1.0dev"
# TODO use STK to extend BoM services objects? e.g. adding all references to sparsely referenced object
2 changes: 1 addition & 1 deletion src/ansys/grantami/bomanalytics/_item_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def substances(self) -> List[ImpactedSubstance]:

results = []
for legislation_result in self.substances_by_legislation.values():
results.extend(legislation_result) # TODO: Merge these property, i.e. take max amount? range?
results.extend(legislation_result)
return results

def __repr__(self) -> str:
Expand Down
4 changes: 2 additions & 2 deletions src/ansys/grantami/bomanalytics/_query_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def impacted_substances_by_legislation(self) -> Dict[str, List["ImpactedSubstanc
) in item_result.substances_by_legislation.items():
results[legislation_name].extend(
legislation_result
) # TODO: Merge these property, i.e. take max amount? range?
)
return dict(results)

@property
Expand All @@ -208,7 +208,7 @@ def impacted_substances(self) -> List["ImpactedSubstance"]:
results = []
for item_result in self._results:
for legislation_result in item_result.substances_by_legislation.values():
results.extend(legislation_result) # TODO: Merge these property, i.e. take max amount? range?
results.extend(legislation_result)
return results


Expand Down
2 changes: 1 addition & 1 deletion src/ansys/grantami/bomanalytics/indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def __le__(self, other: object) -> bool:
return self == other or self < other


class RoHSIndicator(_Indicator): # TODO Think about the class hierarchy here, IndicatorDefinition vs Result
class RoHSIndicator(_Indicator):
"""Indicator object that represents RoHS-type compliance of a BoM object against one or more
legislations.
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/grantami/bomanalytics/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def with_stk_records(self: Query_Builder, stk_records: List[Dict[str, str]]) ->
<MaterialCompliance: 2 materials, batch size = 100, 0 indicators>
"""

record_guids: List[str] = [r["record_guid"] for r in stk_records] # TODO Handle database key
record_guids: List[str] = [r["record_guid"] for r in stk_records]
query_builder: Query_Builder = self.with_record_guids(record_guids)
return query_builder

Expand Down

0 comments on commit 62095b1

Please sign in to comment.