Skip to content

Commit

Permalink
Use literal syntax instead of function calls to create the data struc…
Browse files Browse the repository at this point in the history
…ture (#4038)

* Use literal syntax instead of function calls to create the data structure

* Update whats-new.rst

* Update whats-new.rst
  • Loading branch information
pnijhara authored May 6, 2020
1 parent 0b6e22f commit 0e43ba9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,7 @@ Internal Changes
- Use ``async`` / ``await`` for the asynchronous distributed
tests. (:issue:`3987`, :pull:`3989`)
By `Justus Magin <https://github.com/keewis>`_.
- Remove unnecessary comprehensions becuase the built-in functions like
``all``, ``any``, ``enumerate``, ``sum``, ``tuple`` etc. can work directly with a
generator expression. (:pull:`4026`)
- Various internal code clean-ups (:pull:`4026`, :pull:`4038`).
By `Prajjwal Nijhara <https://github.com/pnijhara>`_.

.. _whats-new.0.15.1:
Expand Down
2 changes: 1 addition & 1 deletion xarray/core/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ def merge(
from .dataarray import DataArray
from .dataset import Dataset

dict_like_objects = list()
dict_like_objects = []
for obj in objects:
if not isinstance(obj, (DataArray, Dataset, dict)):
raise TypeError(
Expand Down
2 changes: 1 addition & 1 deletion xarray/util/print_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def show_versions(file=sys.stdout):
("sphinx", lambda mod: mod.__version__),
]

deps_blob = list()
deps_blob = []
for (modname, ver_f) in deps:
try:
if modname in sys.modules:
Expand Down

0 comments on commit 0e43ba9

Please sign in to comment.