Closed Bug 807036 Opened 12 years ago Closed 12 years ago

import-buildbot-data.py pyflake warnings

Categories

(Tree Management Graveyard :: TBPL, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(1 file)

dataimport\import-buildbot-data.py:19: 're' imported but unused dataimport\import-buildbot-data.py:31: redefinition of unused 'json' from line 29 dataimport\import-buildbot-data.py:147: local variable 'io' is assigned to but never used dataimport\import-buildbot-data.py:148: local variable 'ex' is assigned to but never used
Attached patch Patch v1Splinter Review
Found in response to your blog post :-) This fixes three of the warnings, just not the "redefinition of unused 'json' from line 29" one - ideas? (Guess we might just have to ignore it)
Assignee: nobody → bmo
Status: NEW → ASSIGNED
Attachment #676693 - Flags: review?(wlachance)
Comment on attachment 676693 [details] [diff] [review] Patch v1 LGTM
Attachment #676693 - Flags: review?(wlachance) → review+
(In reply to Ed Morley [:edmorley UTC+0] from comment #1) > Created attachment 676693 [details] [diff] [review] > Patch v1 > > Found in response to your blog post :-) > > This fixes three of the warnings, just not the "redefinition of unused > 'json' from line 29" one - ideas? (Guess we might just have to ignore it) Yes, this is a bit of a false positive. There's only a few of them with pyflakes, but this is one. I suppose when we move to python 2.7 across the board we can move to just typing "import json" and this will just go away.
Thank you :-) https://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/8165dba23bf6 (In reply to William Lachance (:wlach) from comment #3) > I suppose when we move to python 2.7 across the board we can move to just > typing "import json" and this will just go away. Reading around seems to suggest that simplejosn is still faster that the native implementation, or is this no longer the case with newer versions of python?
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Depends on: 807786
(In reply to Ed Morley [:edmorley UTC+0] from comment #4) > Thank you :-) > > https://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/ > 8165dba23bf6 > > (In reply to William Lachance (:wlach) from comment #3) > > I suppose when we move to python 2.7 across the board we can move to just > > typing "import json" and this will just go away. > > Reading around seems to suggest that simplejosn is still faster that the > native implementation, or is this no longer the case with newer versions of > python? Hmm, it appears that you might be right (http://stackoverflow.com/a/3544125/295132). Regardless I doubt json parsing is a bottleneck in any of our code. :)
Product: Webtools → Tree Management
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: