Skip to content

Commit

Permalink
Remove Path.with_stem
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Nov 7, 2023
1 parent 9a34c40 commit 15299b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion isimip_qa/mixins/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def get_path(self, ifig):
self.path = self.path.with_suffix('.' + settings.PLOTS_FORMAT)

stem = self.path.stem
suffix = self.path.suffix

if self.dimensions:
placeholders = {}
Expand Down Expand Up @@ -96,7 +97,7 @@ def get_path(self, ifig):
if self.period.type == 'slice':
stem = f'{stem}_{self.period.start_date}_{self.period.end_date}'

return settings.PLOTS_PATH / self.path.with_stem(stem)
return settings.PLOTS_PATH / self.path.with_name(stem).with_suffix(suffix)

def get_grid(self, figs=False):
grid = [1, 1, 1] if figs else [1, 1]
Expand Down

0 comments on commit 15299b7

Please sign in to comment.