Skip to content

Commit

Permalink
Remove redundant if statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioannis-vm committed Dec 11, 2024
1 parent 7ad61b0 commit a9d6b3e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pelicun/file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,7 @@ def substitute_default_path(
if isinstance(data_path_str, str) and 'PelicunDefault/' in data_path_str:
data_path = Path(data_path_str)
# Extract the filename after 'PelicunDefault/'
file_name = (
data_path.parts[-1]
if 'PelicunDefault' in data_path.parts
else data_path.name
)
file_name = data_path.parts[-1]

# Check if the filename exists in the resource paths
# dictionary
Expand Down

0 comments on commit a9d6b3e

Please sign in to comment.