diff --git a/pymbolic/geometric_algebra/__init__.py b/pymbolic/geometric_algebra/__init__.py index 51a214c..8b0cbd5 100644 --- a/pymbolic/geometric_algebra/__init__.py +++ b/pymbolic/geometric_algebra/__init__.py @@ -1136,7 +1136,7 @@ def xproject( def all_grades(self) -> set[int]: """Return a :class:`set` of grades occurring in *self*.""" - return {bits.bit_count() for bits, _coeff in self.data.items()} + return {bits.bit_count() for bits in self.data} def get_pure_grade(self) -> int | None: """If *self* only has components of a single grade, return diff --git a/pymbolic/mapper/__init__.py b/pymbolic/mapper/__init__.py index 0dcf669..ea1dce6 100644 --- a/pymbolic/mapper/__init__.py +++ b/pymbolic/mapper/__init__.py @@ -701,7 +701,7 @@ def map_multivector(self, ) -> ResultT: return self.combine( self.rec(coeff, *args, **kwargs) - for _bits, coeff in expr.data.items()) + for coeff in expr.data.values()) def map_common_subexpression(self, expr: p.CommonSubexpression, /, *args: P.args, **kwargs: P.kwargs diff --git a/pymbolic/mapper/dependency.py b/pymbolic/mapper/dependency.py index e650f6f..8d8b2b2 100644 --- a/pymbolic/mapper/dependency.py +++ b/pymbolic/mapper/dependency.py @@ -120,7 +120,7 @@ def map_call_with_kwargs( [self.rec(child, *args, **kwargs) for child in expr.parameters] + [ self.rec(val, *args, **kwargs) - for _name, val in expr.kw_parameters.items() + for val in expr.kw_parameters.values() ] ) elif self.include_calls: