Skip to content

Commit 0e43ba9

Browse files
authored
Use literal syntax instead of function calls to create the data structure (#4038)
* Use literal syntax instead of function calls to create the data structure * Update whats-new.rst * Update whats-new.rst
1 parent 0b6e22f commit 0e43ba9

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

doc/whats-new.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,7 @@ Internal Changes
142142
- Use ``async`` / ``await`` for the asynchronous distributed
143143
tests. (:issue:`3987`, :pull:`3989`)
144144
By `Justus Magin <https://github.com/keewis>`_.
145-
- Remove unnecessary comprehensions becuase the built-in functions like
146-
``all``, ``any``, ``enumerate``, ``sum``, ``tuple`` etc. can work directly with a
147-
generator expression. (:pull:`4026`)
145+
- Various internal code clean-ups (:pull:`4026`, :pull:`4038`).
148146
By `Prajjwal Nijhara <https://github.com/pnijhara>`_.
149147

150148
.. _whats-new.0.15.1:

xarray/core/merge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ def merge(
841841
from .dataarray import DataArray
842842
from .dataset import Dataset
843843

844-
dict_like_objects = list()
844+
dict_like_objects = []
845845
for obj in objects:
846846
if not isinstance(obj, (DataArray, Dataset, dict)):
847847
raise TypeError(

xarray/util/print_versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def show_versions(file=sys.stdout):
129129
("sphinx", lambda mod: mod.__version__),
130130
]
131131

132-
deps_blob = list()
132+
deps_blob = []
133133
for (modname, ver_f) in deps:
134134
try:
135135
if modname in sys.modules:

0 commit comments

Comments
 (0)