Patchwork D7763: tests: avoid using a list comprehension to fill a list with fixed values

login
register
mail settings
Submitter phabricator
Date Dec. 28, 2019, 3:04 a.m.
Message ID <differential-rev-PHID-DREV-zjhx6mrfehy2wv74saz2-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/44106/
State Superseded
Headers show

Comments

phabricator - Dec. 28, 2019, 3:04 a.m.
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Flagged by PyCharm as an unused assignment for the variable in the list.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7763

AFFECTED FILES
  tests/test-cbor.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-cbor.py b/tests/test-cbor.py
--- a/tests/test-cbor.py
+++ b/tests/test-cbor.py
@@ -1230,7 +1230,7 @@ 
             True,
             False,
             None,
-            [None for i in range(128)],
+            [None] * 128,
         ]
 
         encoded = b''.join(cborutil.streamencode(source))