mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-28 20:52:57 +08:00
use {} instead of dict() (#695)
This commit is contained in:
@ -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
|
||||
|
@ -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__)
|
||||
|
Reference in New Issue
Block a user