Skip to content

Commit

Permalink
ruff v0.8.0 formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaspie committed Nov 27, 2024
1 parent d5279b6 commit a589155
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pynxtools_xps/phi/spe_pro_phi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ def add_regions_and_areas_to_spectra(self, regions: list, areas: list):

region_and_areas: Dict[str, Any] = {}

for key in concatenated:
for key, value in concatenated.items():
replacement_map = {
"_units": "/@units",
"energy_type": "energy/@type",
Expand All @@ -1127,7 +1127,7 @@ def add_regions_and_areas_to_spectra(self, regions: list, areas: list):
if suffix in key:
new_key = key.replace(suffix, replacement)

region_and_areas[new_key] = concatenated[key]
region_and_areas[new_key] = value

self.spectra += [region_and_areas]

Expand Down
3 changes: 1 addition & 2 deletions src/pynxtools_xps/reader_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,8 @@ def _re_map_single_value(
if isinstance(value, str) and value is not None:
value = value.rstrip("\n")

for key in map_functions:
for key, map_method in map_functions.items():
if key in input_key:
map_method = map_functions[key]
value = map_method(value) # type: ignore[operator]
return value

Expand Down

0 comments on commit a589155

Please sign in to comment.