Skip to content

Comments

Removed duplicate property definitions in CityLearnEnv class#155

Open
LucasNH wants to merge 1 commit intonagyzoltan:masterfrom
LucasNH:CityLearnEnv-cleanup
Open

Removed duplicate property definitions in CityLearnEnv class#155
LucasNH wants to merge 1 commit intonagyzoltan:masterfrom
LucasNH:CityLearnEnv-cleanup

Conversation

@LucasNH
Copy link
Contributor

@LucasNH LucasNH commented Nov 9, 2025

Description

Removed duplicate property definitions in CityLearnEnv class, removed trailing whitespace.

Issue

Duplicate definitions of the following properties in the CityLearnEnv class:

  • net_electricity_consumption_cost_without_storage (different return type: .tolist() rather than .to_numpy())
  • net_electricity_consumption_emission_without_storage (exact duplicate)
  • net_electricity_consumption_without_storage (exact duplicate)

Original definitions in lines 629-654, duplicate definitions in lines 656-681.

(base) ~ % sed -n '628,682p' citylearn/citylearn.py | grep 'def ' | sort | uniq -d def net_electricity_consumption_cost_without_storage(self) -> np.ndarray: def net_electricity_consumption_emission_without_storage(self) -> np.ndarray: def net_electricity_consumption_without_storage(self) -> np.ndarray:

Changes

  • Removed duplicated definitions; favoured definitions consistent with return type (only relevant for net_electricity_consumption_cost_without_storage),
  • Removed trailing whitepsace.

Screenshots

n/a

Checklist

  • I have tested the changes locally and they work as intended.
  • I have updated the documentation, if applicable.
  • I have added new tests, if applicable.
  • I have added any required dependencies to the requirements.txt file, if applicable.
  • I have followed the project's code style and conventions.

Additional notes

The only functional changes were made within lines 628 and 682 by removed duplicate property definitions in CityLearnEnv class of citylearn/citylearn.py. All other changes are trailing whitespace removal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant