use {} instead of dict() (#695)

This commit is contained in:
alrex
2021-09-22 10:37:24 -07:00
committed by GitHub
parent 354bdc42d9
commit eded5f7df6
2 changed files with 2 additions and 2 deletions

View File

@ -131,7 +131,7 @@ def attach_span(task, task_id, span, is_publish=False):
"""
span_dict = getattr(task, CTX_KEY, None)
if span_dict is None:
span_dict = dict()
span_dict = {}
setattr(task, CTX_KEY, span_dict)
span_dict[(task_id, is_publish)] = span

View File

@ -194,7 +194,7 @@ def get_base_estimators(packages: List[str]) -> Dict[str, Type[BaseEstimator]]:
A dictionary of qualnames and classes inheriting from
``BaseEstimator``.
"""
klasses = dict()
klasses = {}
for package_name in packages:
lib = import_module(package_name)
package_dir = os.path.dirname(lib.__file__)