Closed Bug 1344718 Opened 8 years ago Closed 8 years ago

Enable flake8 rule E302: "expected 2 blank lines, found 1"

Categories

(Toolkit :: Telemetry, enhancement, P3)

enhancement
Points:
1

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox54 --- wontfix
firefox55 --- fixed

People

(Reporter: Dexter, Assigned: djmdeveloper060796, Mentored)

References

Details

(Whiteboard: [measurement:client][lang=python])

Attachments

(1 file, 1 obsolete file)

In bug 1332651 we landed flake8 initial support to lint Python files in the Telemetry directory, by disabling all the detected problems. This bug is about enabling the E302 rule: "expected 2 blank lines, found 1": 1) Remove the E302 rule from the .flake8 file in https://dxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry 2) Run "./mach lint -l flake8 toolkit/components/telemetry". 3) Fix the reported problems
Points: --- → 1
Priority: -- → P3
Whiteboard: [measurement:client][lang=python]
@Alessio I would like to work on this, would please assign me to this ?
Flags: needinfo?(alessio.placitelli)
(In reply to Deepjyoti Mondal from comment #1) > @Alessio I would like to work on this, would please assign me to this ? Before this bug becomes actionable, we need the dependency (Enabling flake8) to land! :) Once it does, if no problem arises and you have some spare time, I'll gladly do!
Flags: needinfo?(alessio.placitelli)
okay :)
Blocks: 1344831
No longer blocks: 1344831
Attached patch bug1344718.patch (obsolete) — Splinter Review
Enabled flake8 rule E302
Attachment #8844346 - Flags: review?(alessio.placitelli)
Assignee: nobody → djmdeveloper060796
Comment on attachment 8844346 [details] [diff] [review] bug1344718.patch Review of attachment 8844346 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for the patch, this looks good overall. However, if you apply it on the most recent version of mozilla-central, you will get: > shared_telemetry_utils.py > 24:1 error expected 2 blank lines, found 1 E302 (flake8) > 27:1 error expected 2 blank lines, found 1 E302 (flake8) > ? 2 problems (2 errors, 0 warnings) Please fix both histogram_tools.py and shared_telemetry_utils.py. ::: toolkit/components/telemetry/histogram_tools.py @@ +431,4 @@ > # just Histograms.json. For each file's basename, we have a specific > # routine to parse that file, and return a dictionary mapping histogram > # names to histogram parameters. > + Instead of adding the newlines after the comment block, could you add them before?
Attachment #8844346 - Flags: review?(alessio.placitelli) → feedback+
Attached patch bug1344718.patchSplinter Review
I have updated my mozilla-central repo and have made the changes. Its not showing any error.
Attachment #8844346 - Attachment is obsolete: true
Attachment #8844985 - Flags: review?(alessio.placitelli)
Comment on attachment 8844985 [details] [diff] [review] bug1344718.patch Review of attachment 8844985 [details] [diff] [review]: ----------------------------------------------------------------- This looks good now, thanks! For the next time, could you please append the name of the reviewer at the end of the patch? For example, the current commit message would become: "Bug 1344718 - Enabled flake8 rule E302: "expected 2 blank lines, found 1". r?dexter" See https://developer.mozilla.org/en-US/docs/Mercurial/Using_Mercurial#Commit_Message_Conventions
Attachment #8844985 - Flags: review?(alessio.placitelli) → review+
Sure, I wont miss it next time :)
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/50a0ca4800c1 Enable flake8 rule E302: "expected 2 blank lines, found 1" for Telemetry code. r=Dexter
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: