Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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