Browse Source

Use literal syntax instead of function calls to create data structure

Signed-off-by: shubhendra <withshubh@gmail.com>
shubhendra 3 years ago
parent
commit
cb89aa5a5e
3 changed files with 3 additions and 3 deletions
  1. 1 1
      utils/downloads.py
  2. 1 1
      utils/filescfg.py
  3. 1 1
      utils/patches.py

+ 1 - 1
utils/downloads.py

@@ -88,7 +88,7 @@ class DownloadInfo: #pylint: disable=too-few-public-methods
             if name in self._passthrough_properties:
             if name in self._passthrough_properties:
                 return self._section_dict.get(name, fallback=None)
                 return self._section_dict.get(name, fallback=None)
             if name == 'hashes':
             if name == 'hashes':
-                hashes_dict = dict()
+                hashes_dict = {}
                 for hash_name in (*self._hashes, 'hash_url'):
                 for hash_name in (*self._hashes, 'hash_url'):
                     value = self._section_dict.get(hash_name, fallback=None)
                     value = self._section_dict.get(hash_name, fallback=None)
                     if value:
                     if value:

+ 1 - 1
utils/filescfg.py

@@ -177,7 +177,7 @@ def main():
         type=Path,
         type=Path,
         metavar='PATH',
         metavar='PATH',
         action='append',
         action='append',
-        default=list(),
+        default=[],
         help=('File or directory to include in the root of the archive. Specify '
         help=('File or directory to include in the root of the archive. Specify '
               'multiple times to include multiple different items. '
               'multiple times to include multiple different items. '
               'For zip files, these contents must only be regular files.'))
               'For zip files, these contents must only be regular files.'))

+ 1 - 1
utils/patches.py

@@ -155,7 +155,7 @@ def merge_patches(source_iter, destination, prepend=False):
     destination must not already exist, unless prepend is True. If prepend is True, then
     destination must not already exist, unless prepend is True. If prepend is True, then
     the source patches will be prepended to the destination.
     the source patches will be prepended to the destination.
     """
     """
-    series = list()
+    series = []
     known_paths = set()
     known_paths = set()
     if destination.exists():
     if destination.exists():
         if prepend:
         if prepend: