Dictionary creation could be rewritten as a dictionary literal
Bug #1482586 reported by
Ankit Agrawal
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Low
|
Ankit Agrawal |
Bug Description
There are several places where dict is created and then initialized with keys later.
for example.
test_metadef_
ResourceTypeCon
filters = {}
filter['namespace'] = namespace
could be rewritten as
filters = {'namespace': namespace}
Changed in glance: | |
assignee: | nobody → Ankit Agrawal (ankitagrawal) |
Changed in glance: | |
status: | New → In Progress |
Changed in glance: | |
importance: | Undecided → Low |
Changed in glance: | |
milestone: | none → liberty-rc1 |
status: | Fix Committed → Fix Released |
Changed in glance: | |
milestone: | liberty-rc1 → 11.0.0 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/210303 /git.openstack. org/cgit/ openstack/ glance/ commit/ ?id=16ab5d7c178 1626293ec67b57f 66dbfcc3cd2176
Committed: https:/
Submitter: Jenkins
Branch: master
commit 16ab5d7c1781626 293ec67b57f66db fcc3cd2176
Author: ankitagrawal <email address hidden>
Date: Wed Aug 5 05:20:51 2015 -0700
Use dictionary literal for dictionary creation
Dictionary creation could be rewritten as a dictionary literal.
for example:
filters = {} 'namespace' ] = namespace
filter[
could be rewritten as
filters = {'namespace': namespace}
Closes-Bug: 1482586 a248a579a6032c1 4370843d9e4
Change-Id: I860483e958296d