Closed
Bug 1438839
Opened 6 years ago
Closed 6 years ago
Make tools/ flake8/pep8 compatible
Categories
(Developer Infrastructure :: Source Code Analysis, enhancement)
Developer Infrastructure
Source Code Analysis
Tracking
(firefox61 fixed)
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: Sylvestre)
References
Details
Attachments
(4 files, 1 obsolete file)
No description provided.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 3•6 years ago
|
||
mozreview-review |
Comment on attachment 8951596 [details] Bug 1438839 - Make tools/ flake8/pep8 compatible https://reviewboard.mozilla.org/r/220896/#review226962 Was this completely generated with autopep8? It looks like it's wrapping lines at 80 characters rather than the in-tree specification of 100. Any chance you could redo it with `--max-line-length 99`? (Sorry, 80 character line wrapping in python is a bit of a pet peeve of mine) If you made a bunch of manual modifications and doing this would overwrite them, then let me know and I'll accept the 80 character wrap :).
Attachment #8951596 -
Flags: review?(ahalberstadt) → review-
Comment 4•6 years ago
|
||
mozreview-review |
Comment on attachment 8951597 [details] Bug 1438839 - Add tools/ as part of the whitelist of flake8 https://reviewboard.mozilla.org/r/220898/#review226964 Thanks for doing this!
Attachment #8951597 -
Flags: review?(ahalberstadt) → review+
Assignee | ||
Comment 5•6 years ago
|
||
Yes, I did a bunch of manual changes
Comment 6•6 years ago
|
||
mozreview-review |
Comment on attachment 8951596 [details] Bug 1438839 - Make tools/ flake8/pep8 compatible https://reviewboard.mozilla.org/r/220896/#review227454 ::: tools/lint/eslint/__init__.py:58 (Diff revision 1) > > if not binary: > binary = os.environ.get('ESLINT', None) > > if not binary: > - binary = os.path.join(module_path, "node_modules", ".bin", "eslint") > + binary = os.path.join( I'll allow the 80 character line length on the condition that the directories that are already included remain untouched as they already pass the linter and IMO this patch makes them look worse. If using a modern hg, you can add: [extensions] uncommit = To your ~/.hgrc, then run: $ hg uncommit -I "glob:tools/lint/**" -I "glob:tools/tryselect/**" -I tools/mach_commands.py $ hg revert -a ::: tools/update-packaging/test_make_incremental_updates.py:5 (Diff revision 1) > #!/usr/bin/python > # This Source Code Form is subject to the terms of the Mozilla Public > # License, v. 2.0. If a copy of the MPL was not distributed with this > # file, You can obtain one at http://mozilla.org/MPL/2.0/. > +# noqa: E501 This is already excluded in the .flake8
Attachment #8951596 -
Flags: review- → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•6 years ago
|
Attachment #8951596 -
Attachment is obsolete: true
Assignee | ||
Comment 10•6 years ago
|
||
mozreview-review-reply |
Comment on attachment 8951596 [details] Bug 1438839 - Make tools/ flake8/pep8 compatible https://reviewboard.mozilla.org/r/220896/#review227454 > I'll allow the 80 character line length on the condition that the directories that are already included remain untouched as they already pass the linter and IMO this patch makes them look worse. > > If using a modern hg, you can add: > > [extensions] > uncommit = > > To your ~/.hgrc, then run: > > $ hg uncommit -I "glob:tools/lint/**" -I "glob:tools/tryselect/**" -I tools/mach_commands.py > $ hg revert -a I have redone the change with the 99 chars. I don't like 80 either :)
Comment hidden (mozreview-request) |
Assignee | ||
Comment 12•6 years ago
|
||
I removed the change in bug 1441484
Updated•6 years ago
|
Product: Core → Firefox Build System
Comment 13•6 years ago
|
||
mozreview-review |
Comment on attachment 8954204 [details] Bug 1438839 - Fix the remaining flake8 issues by hand https://reviewboard.mozilla.org/r/223364/#review232814 ::: commit-message-25873:1 (Diff revision 2) > +Bug 1438839 - Fix the renaming flake8 issues by hand r?ahal nit: remaining
Attachment #8954204 -
Flags: review?(ahalberstadt) → review+
Comment 14•6 years ago
|
||
mozreview-review |
Comment on attachment 8954203 [details] Bug 1438839 - autopep8 -i --max-line-length 99 on the tools/ https://reviewboard.mozilla.org/r/223362/#review232818 Thanks for redo-ing this!
Attachment #8954203 -
Flags: review?(ahalberstadt) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 18•6 years ago
|
||
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/37a3c981a785 Add tools/ as part of the whitelist of flake8 r=ahal https://hg.mozilla.org/integration/autoland/rev/40fda8b55cf9 autopep8 -i --max-line-length 99 on the tools/ r=ahal https://hg.mozilla.org/integration/autoland/rev/41c11bf05828 Fix the remaining flake8 issues by hand r=ahal
Comment 19•6 years ago
|
||
Backed out for linting failure at /builds/worker/checkouts/gecko/tools/jprof/split-profile.py:36 Push that caused the failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=41c11bf058287cfa3a74f6d6eaab9b49a865b4fe Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=167613333&repo=autoland&lineNumber=271 Backout: https://hg.mozilla.org/integration/autoland/rev/7710bc53bd78019fd1b78c18b49575f5277c634f
Flags: needinfo?(sledru)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 23•6 years ago
|
||
mozreview-review |
Comment on attachment 8954203 [details] Bug 1438839 - autopep8 -i --max-line-length 99 on the tools/ https://reviewboard.mozilla.org/r/223362/#review233798 Code analysis found 50 defects in this patch (only the first 30 are reported here): - 50 defects found by mozlint You can run this analysis locally with: - `./mach lint path/to/file` (JS/Python) If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx ::: tools/docs/mach_commands.py:8 (Diff revision 3) > # file, # You can obtain one at http://mozilla.org/MPL/2.0/. > > from __future__ import absolute_import, print_function, unicode_literals > > import os > import platform Error: 'platform' imported but unused [flake8: F401] ::: tools/docs/mach_commands.py:50 (Diff revision 3) > @CommandArgument('--upload', action='store_true', > help='Upload generated files to S3') > def build_docs(self, what=None, format=None, outdir=None, auto_open=True, > http=None, archive=False, upload=False): > try: > jsdoc = which.which('jsdoc') Error: Local variable 'jsdoc' is assigned to but never used [flake8: F841] ::: tools/jprof/split-profile.py:36 (Diff revision 3) > # > # The input file format looks like the following: > # > # poll g_main_poll > # GetRuleCascade CSSRuleProcessor::GetRuleCascade(nsPresContext *, nsAtom *) > # RuleProcessorData RuleProcessorData::RuleProcessorData(nsPresContext *, nsIContent *, nsRuleWalker *, nsCompatibility *) Error: Line too long (124 > 99 characters) [flake8: E501] ::: tools/power/mach_commands.py:14 (Diff revision 3) > from mach.decorators import ( > Command, > CommandArgument, > CommandProvider, > ) > from mozbuild.base import ( Error: 'mozbuild.base.machcommandconditions as conditions' imported but unused [flake8: F401] ::: tools/power/mach_commands.py:57 (Diff revision 3) > # before |rapl| and |powermetrics| are called. This ensures that |rapl| > # doesn't start measuring while |powermetrics| is waiting for the root > # password to be entered. > try: > subprocess.check_call(['sudo', 'true']) > except: Error: Do not use bare except' [flake8: E722] ::: tools/power/mach_commands.py:140 (Diff revision 3) > # > # - 'WindowServer' is for the WindowServer. > # > # - 'kernel' is for the kernel. > # > if re.search(r'(^Name|firefox|plugin-container|Safari\b|WebKit|Chrome|Terminal|WindowServer|kernel)', line): Error: Line too long (120 > 99 characters) [flake8: E501] ::: tools/profiler/merge-profiles.py:62 (Diff revision 3) > if str[:2] == '0x': > newLoc = pidStr + str > stringTable[i] = newLoc > symTable[newLoc] = str > else: > samples = thread['samples'] Error: Local variable 'samples' is assigned to but never used [flake8: F841] ::: tools/profiler/merge-profiles.py:111 (Diff revision 3) > > if len(sys.argv) > 1: > MergeProfiles(sys.argv[1:]) > sys.exit(0) > > print "Usage: merge-profile.py profile_<pid1>_<pname1>.sym profile_<pid2>_<pname2>.sym > merged.sym" Error: Line too long (100 > 99 characters) [flake8: E501] ::: tools/rb/fix_linux_stack.py:15 (Diff revision 3) > > import subprocess > import sys > import re > import os > import pty Error: 'pty' imported but unused [flake8: F401] ::: tools/rb/fix_linux_stack.py:16 (Diff revision 3) > import subprocess > import sys > import re > import os > import pty > import termios Error: 'termios' imported but unused [flake8: F401] ::: tools/rb/fix_linux_stack.py:258 (Diff revision 3) > devnull = open(os.devnull) > file_stuff = {} > > + > def addressToSymbol(file, address): > if not file in file_stuff: Error: Test for membership should be 'not in' [flake8: E713] ::: tools/rb/fix_macosx_stack.py:58 (Diff revision 3) > + > address_adjustments = {} > + > + > def address_adjustment(file): > if not file in address_adjustments: Error: Test for membership should be 'not in' [flake8: E713] ::: tools/rb/fix_macosx_stack.py:86 (Diff revision 3) > atoses = {} > + > + > def addressToSymbol(file, address): > converter = None > if not file in atoses: Error: Test for membership should be 'not in' [flake8: E713] ::: tools/rb/fix_stack_using_bpsyms.py:84 (Diff revision 3) > - self.funcs = funcs > + self.funcs = funcs > > - def addrToSymbol(self, address): > + def addrToSymbol(self, address): > - i = bisect.bisect(self.addrs, address) - 1 > + i = bisect.bisect(self.addrs, address) - 1 > - if i > 0: > + if i > 0: > - #offset = address - self.addrs[i] > + #offset = address - self.addrs[i] Error: Block comment should start with '# ' [flake8: E265] ::: tools/rb/fix_stack_using_bpsyms.py:135 (Diff revision 3) > parsedSymbolFiles = {} > + > + > def getSymbolFile(file, symbolsDir): > - p = None > + p = None > - if not file in parsedSymbolFiles: > + if not file in parsedSymbolFiles: Error: Test for membership should be 'not in' [flake8: E713] ::: tools/update-packaging/make_incremental_updates.py:8 (Diff revision 3) > # file, You can obtain one at http://mozilla.org/MPL/2.0/. > > import os > import shutil > import hashlib > from os.path import join, getsize Error: 'os.path.getsize' imported but unused [flake8: F401] ::: tools/update-packaging/make_incremental_updates.py:8 (Diff revision 3) > # file, You can obtain one at http://mozilla.org/MPL/2.0/. > > import os > import shutil > import hashlib > from os.path import join, getsize Error: 'os.path.join' imported but unused [flake8: F401] ::: tools/update-packaging/make_incremental_updates.py:9 (Diff revision 3) > > import os > import shutil > import hashlib > from os.path import join, getsize > from stat import * Error: 'from stat import *' used; unable to detect undefined names [flake8: F403] ::: tools/update-packaging/make_incremental_updates.py:9 (Diff revision 3) > > import os > import shutil > import hashlib > from os.path import join, getsize > from stat import * Error: 'stat.*' imported but unused [flake8: F401] ::: tools/update-packaging/make_incremental_updates.py:14 (Diff revision 3) > from stat import * > import re > import sys > import getopt > import time > import datetime Error: 'datetime' imported but unused [flake8: F401] ::: tools/update-packaging/make_incremental_updates.py:15 (Diff revision 3) > import re > import sys > import getopt > import time > import datetime > import string Error: 'string' imported but unused [flake8: F401] ::: tools/update-packaging/make_incremental_updates.py:210 (Diff revision 3) > # Copy the file over > shutil.copy2(src_file_abs_path, dst_file_abs_path) > > + > def xz_file(filename): > """ XZ compresses the file in place. The original file is replaced with the xz compressed version of itself Error: Line too long (108 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:217 (Diff revision 3) > - exec_shell_cmd('xz --compress --x86 --lzma2 --format=xz --check=crc64 "' + filename+'"') > - os.rename(filename+".xz",filename) > + exec_shell_cmd('xz --compress --x86 --lzma2 --format=xz --check=crc64 "' + filename + '"') > + os.rename(filename + ".xz", filename) > + > > def xzunzip_file(filename): > """ xz decompresses the file in palce. The original file is replaced with a xz decompressed version of itself. Error: Line too long (111 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:297 (Diff revision 3) > copy_file(src_file_abs_path, os.path.join(patch_info.work_dir, file_in_manifest_name)) > - patch_info.archive_files.append('"'+file_in_manifest_name+'"') > + patch_info.archive_files.append('"' + file_in_manifest_name + '"') > + > > def create_add_patch_for_file(to_marfile_entry, patch_info): > """ Copy the file to the working dir, add the add instruction, and add it to the list of archive files """ Error: Line too long (111 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:304 (Diff revision 3) > patch_info.append_add_instruction(to_marfile_entry.name) > - patch_info.archive_files.append('"'+to_marfile_entry.name+'"') > + patch_info.archive_files.append('"' + to_marfile_entry.name + '"') > + > > def create_add_if_not_patch_for_file(to_marfile_entry, patch_info): > """ Copy the file to the working dir, add the add-if-not instruction, and add it to the list of archive files """ Error: Line too long (118 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:342 (Diff revision 3) > # manifests expects / for path separators on all platforms. > line = line.replace("\\", "/") > patch_info.append_remove_instruction(line) > > + > def create_partial_patch(from_dir_path, to_dir_path, patch_filename, shas, patch_info, forced_updates, add_if_not_list): Error: Line too long (120 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:479 (Diff revision 3) > for example: firefox-3.0b3pre.en-US.linux-i686.complete.mar > Or linux-i686/en-US/firefox-3.0b3.complete.mar > Returns dict with keys product, version, locale, platform, type > """ > try: > m = re.search( Error: Indentation is not a multiple of four [flake8: E111] ::: tools/update-packaging/make_incremental_updates.py:480 (Diff revision 3) > Or linux-i686/en-US/firefox-3.0b3.complete.mar > Returns dict with keys product, version, locale, platform, type > """ > try: > m = re.search( > '(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)', Error: Line too long (126 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:481 (Diff revision 3) > Returns dict with keys product, version, locale, platform, type > """ > try: > m = re.search( > '(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)', > os.path.basename(filepath)) Error: Continuation line missing indentation or outdented [flake8: E122] ::: tools/update-packaging/make_incremental_updates.py:482 (Diff revision 3) > """ > try: > m = re.search( > '(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)', > os.path.basename(filepath)) > return m.groupdict() Error: Indentation is not a multiple of four [flake8: E111] ::: tools/update-packaging/make_incremental_updates.py:484 (Diff revision 3) > m = re.search( > '(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)', > os.path.basename(filepath)) > return m.groupdict() > except Exception as exc: > try: Error: Indentation is not a multiple of four [flake8: E111] ::: tools/update-packaging/make_incremental_updates.py:486 (Diff revision 3) > os.path.basename(filepath)) > return m.groupdict() > except Exception as exc: > try: > m = re.search( > '(?P<platform>.+?)\/(?P<locale>.+?)\/(?P<product>\w+)-(?P<version>\w+\.\w+)\.(?P<type>\w+).mar', Error: Line too long (106 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:487 (Diff revision 3) > return m.groupdict() > except Exception as exc: > try: > m = re.search( > '(?P<platform>.+?)\/(?P<locale>.+?)\/(?P<product>\w+)-(?P<version>\w+\.\w+)\.(?P<type>\w+).mar', > filepath) Error: Continuation line missing indentation or outdented [flake8: E122] ::: tools/update-packaging/make_incremental_updates.py:489 (Diff revision 3) > try: > m = re.search( > '(?P<platform>.+?)\/(?P<locale>.+?)\/(?P<product>\w+)-(?P<version>\w+\.\w+)\.(?P<type>\w+).mar', > filepath) > return m.groupdict() > except: Error: Do not use bare except' [flake8: E722] ::: tools/update-packaging/make_incremental_updates.py:489 (Diff revision 3) > try: > m = re.search( > '(?P<platform>.+?)\/(?P<locale>.+?)\/(?P<product>\w+)-(?P<version>\w+\.\w+)\.(?P<type>\w+).mar', > filepath) > return m.groupdict() > except: Error: Indentation is not a multiple of four [flake8: E111] ::: tools/update-packaging/make_incremental_updates.py:536 (Diff revision 3) > to_shasum = hashlib.sha1(open(to_filename, 'rb').read()).hexdigest() > to_size = str(os.path.getsize(to_filename)) > > mar_extract_time = time.time() > > - partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, ['update.manifest','updatev2.manifest','updatev3.manifest'],[]),forced_updates,['channel-prefs.js','update-settings.ini']) > + partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, [ Error: Line too long (123 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:537 (Diff revision 3) > to_size = str(os.path.getsize(to_filename)) > > mar_extract_time = time.time() > > - partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, ['update.manifest','updatev2.manifest','updatev3.manifest'],[]),forced_updates,['channel-prefs.js','update-settings.ini']) > + partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, [ > + 'update.manifest', 'updatev2.manifest', 'updatev3.manifest'], []), forced_updates, ['channel-prefs.js', 'update-settings.ini']) Error: Line too long (179 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:538 (Diff revision 3) > > mar_extract_time = time.time() > > - partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, ['update.manifest','updatev2.manifest','updatev3.manifest'],[]),forced_updates,['channel-prefs.js','update-settings.ini']) > + partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, [ > + 'update.manifest', 'updatev2.manifest', 'updatev3.manifest'], []), forced_updates, ['channel-prefs.js', 'update-settings.ini']) > partial_buildid = to_buildid Error: Local variable 'partial_buildid' is assigned to but never used [flake8: F841] ::: tools/update-packaging/make_incremental_updates.py:559 (Diff revision 3) > - 'to_version':to_decoded['version'], > - 'from_version':from_decoded['version'], > - 'locale':from_decoded['locale'], > - 'platform':from_decoded['platform'], > + 'to_version': to_decoded['version'], > + 'from_version': from_decoded['version'], > + 'locale': from_decoded['locale'], > + 'platform': from_decoded['platform'], > }) > - print("done with patch %s/%s time (%.2fs/%.2fs/%.2fs) (mar/patch/total)" % (str(patch_num),str(len(patches)),mar_extract_time-startTime,time.time()-mar_extract_time,time.time()-startTime)) > + print("done with patch %s/%s time (%.2fs/%.2fs/%.2fs) (mar/patch/total)" % (str(patch_num), Error: Line too long (103 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:560 (Diff revision 3) > - 'from_version':from_decoded['version'], > - 'locale':from_decoded['locale'], > - 'platform':from_decoded['platform'], > + 'from_version': from_decoded['version'], > + 'locale': from_decoded['locale'], > + 'platform': from_decoded['platform'], > }) > - print("done with patch %s/%s time (%.2fs/%.2fs/%.2fs) (mar/patch/total)" % (str(patch_num),str(len(patches)),mar_extract_time-startTime,time.time()-mar_extract_time,time.time()-startTime)) > + print("done with patch %s/%s time (%.2fs/%.2fs/%.2fs) (mar/patch/total)" % (str(patch_num), > + str(len(patches)), mar_extract_time - startTime, time.time() - mar_extract_time, time.time() - startTime)) Error: Line too long (194 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:36 (Diff revision 3) > self.assertEquals(['add "file.test"'], self.patch_info.manifestv3) > > def test_append_add_if_instruction(self): > self.patch_info.append_add_instruction('distribution/extensions/extension/file.test') > - self.assertEquals(['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) > - self.assertEquals(['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv3) > + self.assertEquals( > + ['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) Error: Line too long (133 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:38 (Diff revision 3) > def test_append_add_if_instruction(self): > self.patch_info.append_add_instruction('distribution/extensions/extension/file.test') > - self.assertEquals(['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) > - self.assertEquals(['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv3) > + self.assertEquals( > + ['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) > + self.assertEquals( > + ['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv3) Error: Line too long (133 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:54 (Diff revision 3) > > def test_append_patch_if_instruction(self): > - self.patch_info.append_patch_instruction('distribution/extensions/extension/file.test', 'patchname') > - self.assertEquals(['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) > - self.assertEquals(['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv3) > + self.patch_info.append_patch_instruction( > + 'distribution/extensions/extension/file.test', 'patchname') > + self.assertEquals( > + ['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) Error: Line too long (147 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:56 (Diff revision 3) > - self.patch_info.append_patch_instruction('distribution/extensions/extension/file.test', 'patchname') > - self.assertEquals(['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) > - self.assertEquals(['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv3) > + self.patch_info.append_patch_instruction( > + 'distribution/extensions/extension/file.test', 'patchname') > + self.assertEquals( > + ['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) > + self.assertEquals( > + ['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv3) Error: Line too long (147 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:113 (Diff revision 3) > + > class TestMakeIncrementalUpdates(unittest.TestCase): > def setUp(self): > work_dir = '.' > - self.patch_info = PatchInfo(work_dir, ['update.manifest','updatev2.manifest','updatev3.manifest'],['/readme.txt']) > + self.patch_info = PatchInfo( > + work_dir, ['update.manifest', 'updatev2.manifest', 'updatev3.manifest'], ['/readme.txt']) Error: Line too long (101 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:131 (Diff revision 3) > mkup.bzip_file('filename') > > def test_bunzip_file(self): > mkup.bunzip_file('filename') > > def test_extract_mar(self): Error: Trailing whitespace [flake8: W291] ::: tools/update-packaging/test_make_incremental_updates.py:135 (Diff revision 3) > > def test_extract_mar(self): > mkup.extract_mar('filename', 'work_dir') > > def test_create_partial_patch_for_file(self): > mkup.create_partial_patch_for_file('from_marfile_entry', 'to_marfile_entry', 'shas', self.patch_info) Error: Line too long (109 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:137 (Diff revision 3) > mkup.extract_mar('filename', 'work_dir') > > def test_create_partial_patch_for_file(self): > mkup.create_partial_patch_for_file('from_marfile_entry', 'to_marfile_entry', 'shas', self.patch_info) > > def test_create_add_patch_for_file(self): Error: Trailing whitespace [flake8: W291] ::: tools/update-packaging/test_make_incremental_updates.py:140 (Diff revision 3) > mkup.create_partial_patch_for_file('from_marfile_entry', 'to_marfile_entry', 'shas', self.patch_info) > > def test_create_add_patch_for_file(self): > mkup.create_add_patch_for_file('to_marfile_entry', self.patch_info) > > def test_process_explicit_remove_files(self): Error: Trailing whitespace [flake8: W291] ::: tools/update-packaging/test_make_incremental_updates.py:144 (Diff revision 3) > > def test_process_explicit_remove_files(self): > mkup.process_explicit_remove_files('dir_path', self.patch_info) > > def test_create_partial_patch(self): > mkup.create_partial_patch('from_dir_path', 'to_dir_path', 'patch_filename', 'shas', self.patch_info, 'forced_updates') Error: Line too long (126 > 99 characters) [flake8: E501]
Comment 24•6 years ago
|
||
mozreview-review |
Comment on attachment 8954204 [details] Bug 1438839 - Fix the remaining flake8 issues by hand https://reviewboard.mozilla.org/r/223364/#review233800 Code analysis found 27 defects in this patch: - 27 defects found by mozlint You can run this analysis locally with: - `./mach lint path/to/file` (JS/Python) If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx ::: tools/power/mach_commands.py:137 (Diff revision 4) > # > # - 'WindowServer' is for the WindowServer. > # > # - 'kernel' is for the kernel. > # > if re.search(r'(^Name|firefox|plugin-container|Safari\b|WebKit|Chrome|Terminal|WindowServer|kernel)', line): Error: Line too long (120 > 99 characters) [flake8: E501] ::: tools/profiler/merge-profiles.py:110 (Diff revision 4) > > if len(sys.argv) > 1: > MergeProfiles(sys.argv[1:]) > sys.exit(0) > > print "Usage: merge-profile.py profile_<pid1>_<pname1>.sym profile_<pid2>_<pname2>.sym > merged.sym" Error: Line too long (100 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:206 (Diff revision 4) > # Copy the file over > shutil.copy2(src_file_abs_path, dst_file_abs_path) > > > def xz_file(filename): > """ XZ compresses the file in place. The original file is replaced with the xz compressed version of itself Error: Line too long (108 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:213 (Diff revision 4) > exec_shell_cmd('xz --compress --x86 --lzma2 --format=xz --check=crc64 "' + filename + '"') > os.rename(filename + ".xz", filename) > > > def xzunzip_file(filename): > """ xz decompresses the file in palce. The original file is replaced with a xz decompressed version of itself. Error: Line too long (111 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:293 (Diff revision 4) > copy_file(src_file_abs_path, os.path.join(patch_info.work_dir, file_in_manifest_name)) > patch_info.archive_files.append('"' + file_in_manifest_name + '"') > > > def create_add_patch_for_file(to_marfile_entry, patch_info): > """ Copy the file to the working dir, add the add instruction, and add it to the list of archive files """ Error: Line too long (111 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:300 (Diff revision 4) > patch_info.append_add_instruction(to_marfile_entry.name) > patch_info.archive_files.append('"' + to_marfile_entry.name + '"') > > > def create_add_if_not_patch_for_file(to_marfile_entry, patch_info): > """ Copy the file to the working dir, add the add-if-not instruction, and add it to the list of archive files """ Error: Line too long (118 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:338 (Diff revision 4) > # manifests expects / for path separators on all platforms. > line = line.replace("\\", "/") > patch_info.append_remove_instruction(line) > > > def create_partial_patch(from_dir_path, to_dir_path, patch_filename, shas, patch_info, forced_updates, add_if_not_list): Error: Line too long (120 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:475 (Diff revision 4) > for example: firefox-3.0b3pre.en-US.linux-i686.complete.mar > Or linux-i686/en-US/firefox-3.0b3.complete.mar > Returns dict with keys product, version, locale, platform, type > """ > try: > m = re.search( Error: Indentation is not a multiple of four [flake8: E111] ::: tools/update-packaging/make_incremental_updates.py:476 (Diff revision 4) > Or linux-i686/en-US/firefox-3.0b3.complete.mar > Returns dict with keys product, version, locale, platform, type > """ > try: > m = re.search( > '(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)', Error: Line too long (126 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:477 (Diff revision 4) > Returns dict with keys product, version, locale, platform, type > """ > try: > m = re.search( > '(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)', > os.path.basename(filepath)) Error: Continuation line missing indentation or outdented [flake8: E122] ::: tools/update-packaging/make_incremental_updates.py:478 (Diff revision 4) > """ > try: > m = re.search( > '(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)', > os.path.basename(filepath)) > return m.groupdict() Error: Indentation is not a multiple of four [flake8: E111] ::: tools/update-packaging/make_incremental_updates.py:480 (Diff revision 4) > m = re.search( > '(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)', > os.path.basename(filepath)) > return m.groupdict() > except Exception as exc: > try: Error: Indentation is not a multiple of four [flake8: E111] ::: tools/update-packaging/make_incremental_updates.py:482 (Diff revision 4) > os.path.basename(filepath)) > return m.groupdict() > except Exception as exc: > try: > m = re.search( > '(?P<platform>.+?)\/(?P<locale>.+?)\/(?P<product>\w+)-(?P<version>\w+\.\w+)\.(?P<type>\w+).mar', Error: Line too long (106 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:483 (Diff revision 4) > return m.groupdict() > except Exception as exc: > try: > m = re.search( > '(?P<platform>.+?)\/(?P<locale>.+?)\/(?P<product>\w+)-(?P<version>\w+\.\w+)\.(?P<type>\w+).mar', > filepath) Error: Continuation line missing indentation or outdented [flake8: E122] ::: tools/update-packaging/make_incremental_updates.py:485 (Diff revision 4) > try: > m = re.search( > '(?P<platform>.+?)\/(?P<locale>.+?)\/(?P<product>\w+)-(?P<version>\w+\.\w+)\.(?P<type>\w+).mar', > filepath) > return m.groupdict() > except: Error: Do not use bare except' [flake8: E722] ::: tools/update-packaging/make_incremental_updates.py:485 (Diff revision 4) > try: > m = re.search( > '(?P<platform>.+?)\/(?P<locale>.+?)\/(?P<product>\w+)-(?P<version>\w+\.\w+)\.(?P<type>\w+).mar', > filepath) > return m.groupdict() > except: Error: Indentation is not a multiple of four [flake8: E111] ::: tools/update-packaging/make_incremental_updates.py:532 (Diff revision 4) > to_shasum = hashlib.sha1(open(to_filename, 'rb').read()).hexdigest() > to_size = str(os.path.getsize(to_filename)) > > mar_extract_time = time.time() > > partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, [ Error: Line too long (123 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:533 (Diff revision 4) > to_size = str(os.path.getsize(to_filename)) > > mar_extract_time = time.time() > > partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, [ > 'update.manifest', 'updatev2.manifest', 'updatev3.manifest'], []), forced_updates, ['channel-prefs.js', 'update-settings.ini']) Error: Line too long (179 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:554 (Diff revision 4) > 'to_version': to_decoded['version'], > 'from_version': from_decoded['version'], > 'locale': from_decoded['locale'], > 'platform': from_decoded['platform'], > }) > print("done with patch %s/%s time (%.2fs/%.2fs/%.2fs) (mar/patch/total)" % (str(patch_num), Error: Line too long (103 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:555 (Diff revision 4) > 'from_version': from_decoded['version'], > 'locale': from_decoded['locale'], > 'platform': from_decoded['platform'], > }) > print("done with patch %s/%s time (%.2fs/%.2fs/%.2fs) (mar/patch/total)" % (str(patch_num), > str(len(patches)), mar_extract_time - startTime, time.time() - mar_extract_time, time.time() - startTime)) Error: Line too long (194 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:36 (Diff revision 4) > self.assertEquals(['add "file.test"'], self.patch_info.manifestv3) > > def test_append_add_if_instruction(self): > self.patch_info.append_add_instruction('distribution/extensions/extension/file.test') > self.assertEquals( > ['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) Error: Line too long (133 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:38 (Diff revision 4) > def test_append_add_if_instruction(self): > self.patch_info.append_add_instruction('distribution/extensions/extension/file.test') > self.assertEquals( > ['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) > self.assertEquals( > ['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv3) Error: Line too long (133 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:54 (Diff revision 4) > > def test_append_patch_if_instruction(self): > self.patch_info.append_patch_instruction( > 'distribution/extensions/extension/file.test', 'patchname') > self.assertEquals( > ['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) Error: Line too long (147 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:56 (Diff revision 4) > self.patch_info.append_patch_instruction( > 'distribution/extensions/extension/file.test', 'patchname') > self.assertEquals( > ['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) > self.assertEquals( > ['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv3) Error: Line too long (147 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:113 (Diff revision 4) > > class TestMakeIncrementalUpdates(unittest.TestCase): > def setUp(self): > work_dir = '.' > self.patch_info = PatchInfo( > work_dir, ['update.manifest', 'updatev2.manifest', 'updatev3.manifest'], ['/readme.txt']) Error: Line too long (101 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:135 (Diff revision 4) > > - def test_extract_mar(self): > + def test_extract_mar(self): > mkup.extract_mar('filename', 'work_dir') > > def test_create_partial_patch_for_file(self): > mkup.create_partial_patch_for_file('from_marfile_entry', 'to_marfile_entry', 'shas', self.patch_info) Error: Line too long (109 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:144 (Diff revision 4) > > - def test_process_explicit_remove_files(self): > + def test_process_explicit_remove_files(self): > mkup.process_explicit_remove_files('dir_path', self.patch_info) > > def test_create_partial_patch(self): > mkup.create_partial_patch('from_dir_path', 'to_dir_path', 'patch_filename', 'shas', self.patch_info, 'forced_updates') Error: Line too long (126 > 99 characters) [flake8: E501]
Assignee | ||
Comment 25•6 years ago
|
||
About comment #23: https://github.com/mozilla-releng/services/issues/944
Flags: needinfo?(sledru)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 29•6 years ago
|
||
mozreview-review |
Comment on attachment 8954203 [details] Bug 1438839 - autopep8 -i --max-line-length 99 on the tools/ https://reviewboard.mozilla.org/r/223362/#review233820 Code analysis found 48 defects in this patch (only the first 30 are reported here): - 48 defects found by mozlint You can run this analysis locally with: - `./mach lint path/to/file` (JS/Python) If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx ::: tools/docs/mach_commands.py:8 (Diff revision 4) > # file, # You can obtain one at http://mozilla.org/MPL/2.0/. > > from __future__ import absolute_import, print_function, unicode_literals > > import os > import platform Error: 'platform' imported but unused [flake8: F401] ::: tools/docs/mach_commands.py:50 (Diff revision 4) > @CommandArgument('--upload', action='store_true', > help='Upload generated files to S3') > def build_docs(self, what=None, format=None, outdir=None, auto_open=True, > http=None, archive=False, upload=False): > try: > jsdoc = which.which('jsdoc') Error: Local variable 'jsdoc' is assigned to but never used [flake8: F841] ::: tools/jprof/split-profile.py:36 (Diff revision 4) > # > # The input file format looks like the following: > # > # poll g_main_poll > # GetRuleCascade CSSRuleProcessor::GetRuleCascade(nsPresContext *, nsAtom *) > # RuleProcessorData RuleProcessorData::RuleProcessorData(nsPresContext *, nsIContent *, nsRuleWalker *, nsCompatibility *) Error: Line too long (124 > 99 characters) [flake8: E501] ::: tools/power/mach_commands.py:14 (Diff revision 4) > from mach.decorators import ( > Command, > CommandArgument, > CommandProvider, > ) > from mozbuild.base import ( Error: 'mozbuild.base.machcommandconditions as conditions' imported but unused [flake8: F401] ::: tools/power/mach_commands.py:57 (Diff revision 4) > # before |rapl| and |powermetrics| are called. This ensures that |rapl| > # doesn't start measuring while |powermetrics| is waiting for the root > # password to be entered. > try: > subprocess.check_call(['sudo', 'true']) > except: Error: Do not use bare except' [flake8: E722] ::: tools/power/mach_commands.py:140 (Diff revision 4) > # > # - 'WindowServer' is for the WindowServer. > # > # - 'kernel' is for the kernel. > # > if re.search(r'(^Name|firefox|plugin-container|Safari\b|WebKit|Chrome|Terminal|WindowServer|kernel)', line): Error: Line too long (120 > 99 characters) [flake8: E501] ::: tools/rb/fix_linux_stack.py:15 (Diff revision 4) > > import subprocess > import sys > import re > import os > import pty Error: 'pty' imported but unused [flake8: F401] ::: tools/rb/fix_linux_stack.py:16 (Diff revision 4) > import subprocess > import sys > import re > import os > import pty > import termios Error: 'termios' imported but unused [flake8: F401] ::: tools/rb/fix_linux_stack.py:258 (Diff revision 4) > devnull = open(os.devnull) > file_stuff = {} > > + > def addressToSymbol(file, address): > if not file in file_stuff: Error: Test for membership should be 'not in' [flake8: E713] ::: tools/rb/fix_macosx_stack.py:58 (Diff revision 4) > + > address_adjustments = {} > + > + > def address_adjustment(file): > if not file in address_adjustments: Error: Test for membership should be 'not in' [flake8: E713] ::: tools/rb/fix_macosx_stack.py:86 (Diff revision 4) > atoses = {} > + > + > def addressToSymbol(file, address): > converter = None > if not file in atoses: Error: Test for membership should be 'not in' [flake8: E713] ::: tools/rb/fix_stack_using_bpsyms.py:84 (Diff revision 4) > - self.funcs = funcs > + self.funcs = funcs > > - def addrToSymbol(self, address): > + def addrToSymbol(self, address): > - i = bisect.bisect(self.addrs, address) - 1 > + i = bisect.bisect(self.addrs, address) - 1 > - if i > 0: > + if i > 0: > - #offset = address - self.addrs[i] > + #offset = address - self.addrs[i] Error: Block comment should start with '# ' [flake8: E265] ::: tools/rb/fix_stack_using_bpsyms.py:135 (Diff revision 4) > parsedSymbolFiles = {} > + > + > def getSymbolFile(file, symbolsDir): > - p = None > + p = None > - if not file in parsedSymbolFiles: > + if not file in parsedSymbolFiles: Error: Test for membership should be 'not in' [flake8: E713] ::: tools/update-packaging/make_incremental_updates.py:8 (Diff revision 4) > # file, You can obtain one at http://mozilla.org/MPL/2.0/. > > import os > import shutil > import hashlib > from os.path import join, getsize Error: 'os.path.getsize' imported but unused [flake8: F401] ::: tools/update-packaging/make_incremental_updates.py:8 (Diff revision 4) > # file, You can obtain one at http://mozilla.org/MPL/2.0/. > > import os > import shutil > import hashlib > from os.path import join, getsize Error: 'os.path.join' imported but unused [flake8: F401] ::: tools/update-packaging/make_incremental_updates.py:9 (Diff revision 4) > > import os > import shutil > import hashlib > from os.path import join, getsize > from stat import * Error: 'from stat import *' used; unable to detect undefined names [flake8: F403] ::: tools/update-packaging/make_incremental_updates.py:9 (Diff revision 4) > > import os > import shutil > import hashlib > from os.path import join, getsize > from stat import * Error: 'stat.*' imported but unused [flake8: F401] ::: tools/update-packaging/make_incremental_updates.py:14 (Diff revision 4) > from stat import * > import re > import sys > import getopt > import time > import datetime Error: 'datetime' imported but unused [flake8: F401] ::: tools/update-packaging/make_incremental_updates.py:15 (Diff revision 4) > import re > import sys > import getopt > import time > import datetime > import string Error: 'string' imported but unused [flake8: F401] ::: tools/update-packaging/make_incremental_updates.py:210 (Diff revision 4) > # Copy the file over > shutil.copy2(src_file_abs_path, dst_file_abs_path) > > + > def xz_file(filename): > """ XZ compresses the file in place. The original file is replaced with the xz compressed version of itself Error: Line too long (108 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:217 (Diff revision 4) > - exec_shell_cmd('xz --compress --x86 --lzma2 --format=xz --check=crc64 "' + filename+'"') > - os.rename(filename+".xz",filename) > + exec_shell_cmd('xz --compress --x86 --lzma2 --format=xz --check=crc64 "' + filename + '"') > + os.rename(filename + ".xz", filename) > + > > def xzunzip_file(filename): > """ xz decompresses the file in palce. The original file is replaced with a xz decompressed version of itself. Error: Line too long (111 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:297 (Diff revision 4) > copy_file(src_file_abs_path, os.path.join(patch_info.work_dir, file_in_manifest_name)) > - patch_info.archive_files.append('"'+file_in_manifest_name+'"') > + patch_info.archive_files.append('"' + file_in_manifest_name + '"') > + > > def create_add_patch_for_file(to_marfile_entry, patch_info): > """ Copy the file to the working dir, add the add instruction, and add it to the list of archive files """ Error: Line too long (111 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:304 (Diff revision 4) > patch_info.append_add_instruction(to_marfile_entry.name) > - patch_info.archive_files.append('"'+to_marfile_entry.name+'"') > + patch_info.archive_files.append('"' + to_marfile_entry.name + '"') > + > > def create_add_if_not_patch_for_file(to_marfile_entry, patch_info): > """ Copy the file to the working dir, add the add-if-not instruction, and add it to the list of archive files """ Error: Line too long (118 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:342 (Diff revision 4) > # manifests expects / for path separators on all platforms. > line = line.replace("\\", "/") > patch_info.append_remove_instruction(line) > > + > def create_partial_patch(from_dir_path, to_dir_path, patch_filename, shas, patch_info, forced_updates, add_if_not_list): Error: Line too long (120 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:479 (Diff revision 4) > for example: firefox-3.0b3pre.en-US.linux-i686.complete.mar > Or linux-i686/en-US/firefox-3.0b3.complete.mar > Returns dict with keys product, version, locale, platform, type > """ > try: > m = re.search( Error: Indentation is not a multiple of four [flake8: E111] ::: tools/update-packaging/make_incremental_updates.py:480 (Diff revision 4) > Or linux-i686/en-US/firefox-3.0b3.complete.mar > Returns dict with keys product, version, locale, platform, type > """ > try: > m = re.search( > '(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)', Error: Line too long (126 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:481 (Diff revision 4) > Returns dict with keys product, version, locale, platform, type > """ > try: > m = re.search( > '(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)', > os.path.basename(filepath)) Error: Continuation line missing indentation or outdented [flake8: E122] ::: tools/update-packaging/make_incremental_updates.py:482 (Diff revision 4) > """ > try: > m = re.search( > '(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)', > os.path.basename(filepath)) > return m.groupdict() Error: Indentation is not a multiple of four [flake8: E111] ::: tools/update-packaging/make_incremental_updates.py:484 (Diff revision 4) > m = re.search( > '(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)', > os.path.basename(filepath)) > return m.groupdict() > except Exception as exc: > try: Error: Indentation is not a multiple of four [flake8: E111] ::: tools/update-packaging/make_incremental_updates.py:486 (Diff revision 4) > os.path.basename(filepath)) > return m.groupdict() > except Exception as exc: > try: > m = re.search( > '(?P<platform>.+?)\/(?P<locale>.+?)\/(?P<product>\w+)-(?P<version>\w+\.\w+)\.(?P<type>\w+).mar', Error: Line too long (106 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:487 (Diff revision 4) > return m.groupdict() > except Exception as exc: > try: > m = re.search( > '(?P<platform>.+?)\/(?P<locale>.+?)\/(?P<product>\w+)-(?P<version>\w+\.\w+)\.(?P<type>\w+).mar', > filepath) Error: Continuation line missing indentation or outdented [flake8: E122] ::: tools/update-packaging/make_incremental_updates.py:489 (Diff revision 4) > try: > m = re.search( > '(?P<platform>.+?)\/(?P<locale>.+?)\/(?P<product>\w+)-(?P<version>\w+\.\w+)\.(?P<type>\w+).mar', > filepath) > return m.groupdict() > except: Error: Do not use bare except' [flake8: E722] ::: tools/update-packaging/make_incremental_updates.py:489 (Diff revision 4) > try: > m = re.search( > '(?P<platform>.+?)\/(?P<locale>.+?)\/(?P<product>\w+)-(?P<version>\w+\.\w+)\.(?P<type>\w+).mar', > filepath) > return m.groupdict() > except: Error: Indentation is not a multiple of four [flake8: E111] ::: tools/update-packaging/make_incremental_updates.py:536 (Diff revision 4) > to_shasum = hashlib.sha1(open(to_filename, 'rb').read()).hexdigest() > to_size = str(os.path.getsize(to_filename)) > > mar_extract_time = time.time() > > - partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, ['update.manifest','updatev2.manifest','updatev3.manifest'],[]),forced_updates,['channel-prefs.js','update-settings.ini']) > + partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, [ Error: Line too long (123 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:537 (Diff revision 4) > to_size = str(os.path.getsize(to_filename)) > > mar_extract_time = time.time() > > - partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, ['update.manifest','updatev2.manifest','updatev3.manifest'],[]),forced_updates,['channel-prefs.js','update-settings.ini']) > + partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, [ > + 'update.manifest', 'updatev2.manifest', 'updatev3.manifest'], []), forced_updates, ['channel-prefs.js', 'update-settings.ini']) Error: Line too long (179 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:538 (Diff revision 4) > > mar_extract_time = time.time() > > - partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, ['update.manifest','updatev2.manifest','updatev3.manifest'],[]),forced_updates,['channel-prefs.js','update-settings.ini']) > + partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, [ > + 'update.manifest', 'updatev2.manifest', 'updatev3.manifest'], []), forced_updates, ['channel-prefs.js', 'update-settings.ini']) > partial_buildid = to_buildid Error: Local variable 'partial_buildid' is assigned to but never used [flake8: F841] ::: tools/update-packaging/make_incremental_updates.py:559 (Diff revision 4) > - 'to_version':to_decoded['version'], > - 'from_version':from_decoded['version'], > - 'locale':from_decoded['locale'], > - 'platform':from_decoded['platform'], > + 'to_version': to_decoded['version'], > + 'from_version': from_decoded['version'], > + 'locale': from_decoded['locale'], > + 'platform': from_decoded['platform'], > }) > - print("done with patch %s/%s time (%.2fs/%.2fs/%.2fs) (mar/patch/total)" % (str(patch_num),str(len(patches)),mar_extract_time-startTime,time.time()-mar_extract_time,time.time()-startTime)) > + print("done with patch %s/%s time (%.2fs/%.2fs/%.2fs) (mar/patch/total)" % (str(patch_num), Error: Line too long (103 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:560 (Diff revision 4) > - 'from_version':from_decoded['version'], > - 'locale':from_decoded['locale'], > - 'platform':from_decoded['platform'], > + 'from_version': from_decoded['version'], > + 'locale': from_decoded['locale'], > + 'platform': from_decoded['platform'], > }) > - print("done with patch %s/%s time (%.2fs/%.2fs/%.2fs) (mar/patch/total)" % (str(patch_num),str(len(patches)),mar_extract_time-startTime,time.time()-mar_extract_time,time.time()-startTime)) > + print("done with patch %s/%s time (%.2fs/%.2fs/%.2fs) (mar/patch/total)" % (str(patch_num), > + str(len(patches)), mar_extract_time - startTime, time.time() - mar_extract_time, time.time() - startTime)) Error: Line too long (194 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:36 (Diff revision 4) > self.assertEquals(['add "file.test"'], self.patch_info.manifestv3) > > def test_append_add_if_instruction(self): > self.patch_info.append_add_instruction('distribution/extensions/extension/file.test') > - self.assertEquals(['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) > - self.assertEquals(['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv3) > + self.assertEquals( > + ['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) Error: Line too long (133 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:38 (Diff revision 4) > def test_append_add_if_instruction(self): > self.patch_info.append_add_instruction('distribution/extensions/extension/file.test') > - self.assertEquals(['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) > - self.assertEquals(['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv3) > + self.assertEquals( > + ['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) > + self.assertEquals( > + ['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv3) Error: Line too long (133 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:54 (Diff revision 4) > > def test_append_patch_if_instruction(self): > - self.patch_info.append_patch_instruction('distribution/extensions/extension/file.test', 'patchname') > - self.assertEquals(['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) > - self.assertEquals(['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv3) > + self.patch_info.append_patch_instruction( > + 'distribution/extensions/extension/file.test', 'patchname') > + self.assertEquals( > + ['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) Error: Line too long (147 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:56 (Diff revision 4) > - self.patch_info.append_patch_instruction('distribution/extensions/extension/file.test', 'patchname') > - self.assertEquals(['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) > - self.assertEquals(['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv3) > + self.patch_info.append_patch_instruction( > + 'distribution/extensions/extension/file.test', 'patchname') > + self.assertEquals( > + ['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) > + self.assertEquals( > + ['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv3) Error: Line too long (147 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:113 (Diff revision 4) > + > class TestMakeIncrementalUpdates(unittest.TestCase): > def setUp(self): > work_dir = '.' > - self.patch_info = PatchInfo(work_dir, ['update.manifest','updatev2.manifest','updatev3.manifest'],['/readme.txt']) > + self.patch_info = PatchInfo( > + work_dir, ['update.manifest', 'updatev2.manifest', 'updatev3.manifest'], ['/readme.txt']) Error: Line too long (101 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:131 (Diff revision 4) > mkup.bzip_file('filename') > > def test_bunzip_file(self): > mkup.bunzip_file('filename') > > def test_extract_mar(self): Error: Trailing whitespace [flake8: W291] ::: tools/update-packaging/test_make_incremental_updates.py:135 (Diff revision 4) > > def test_extract_mar(self): > mkup.extract_mar('filename', 'work_dir') > > def test_create_partial_patch_for_file(self): > mkup.create_partial_patch_for_file('from_marfile_entry', 'to_marfile_entry', 'shas', self.patch_info) Error: Line too long (109 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:137 (Diff revision 4) > mkup.extract_mar('filename', 'work_dir') > > def test_create_partial_patch_for_file(self): > mkup.create_partial_patch_for_file('from_marfile_entry', 'to_marfile_entry', 'shas', self.patch_info) > > def test_create_add_patch_for_file(self): Error: Trailing whitespace [flake8: W291] ::: tools/update-packaging/test_make_incremental_updates.py:140 (Diff revision 4) > mkup.create_partial_patch_for_file('from_marfile_entry', 'to_marfile_entry', 'shas', self.patch_info) > > def test_create_add_patch_for_file(self): > mkup.create_add_patch_for_file('to_marfile_entry', self.patch_info) > > def test_process_explicit_remove_files(self): Error: Trailing whitespace [flake8: W291] ::: tools/update-packaging/test_make_incremental_updates.py:144 (Diff revision 4) > > def test_process_explicit_remove_files(self): > mkup.process_explicit_remove_files('dir_path', self.patch_info) > > def test_create_partial_patch(self): > mkup.create_partial_patch('from_dir_path', 'to_dir_path', 'patch_filename', 'shas', self.patch_info, 'forced_updates') Error: Line too long (126 > 99 characters) [flake8: E501]
Comment 30•6 years ago
|
||
mozreview-review |
Comment on attachment 8954204 [details] Bug 1438839 - Fix the remaining flake8 issues by hand https://reviewboard.mozilla.org/r/223364/#review233822 Code analysis found 28 defects in this patch: - 28 defects found by mozlint You can run this analysis locally with: - `./mach lint path/to/file` (JS/Python) If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx ::: tools/power/mach_commands.py:137 (Diff revision 5) > # > # - 'WindowServer' is for the WindowServer. > # > # - 'kernel' is for the kernel. > # > if re.search(r'(^Name|firefox|plugin-container|Safari\b|WebKit|Chrome|Terminal|WindowServer|kernel)', line): Error: Line too long (120 > 99 characters) [flake8: E501] ::: tools/profiler/merge-profiles.py:62 (Diff revision 5) > if str[:2] == '0x': > newLoc = pidStr + str > stringTable[i] = newLoc > symTable[newLoc] = str > else: > samples = thread['samples'] Error: Local variable 'samples' is assigned to but never used [flake8: F841] ::: tools/profiler/merge-profiles.py:111 (Diff revision 5) > > if len(sys.argv) > 1: > MergeProfiles(sys.argv[1:]) > sys.exit(0) > > print "Usage: merge-profile.py profile_<pid1>_<pname1>.sym profile_<pid2>_<pname2>.sym > merged.sym" Error: Line too long (100 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:206 (Diff revision 5) > # Copy the file over > shutil.copy2(src_file_abs_path, dst_file_abs_path) > > > def xz_file(filename): > """ XZ compresses the file in place. The original file is replaced with the xz compressed version of itself Error: Line too long (108 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:213 (Diff revision 5) > exec_shell_cmd('xz --compress --x86 --lzma2 --format=xz --check=crc64 "' + filename + '"') > os.rename(filename + ".xz", filename) > > > def xzunzip_file(filename): > """ xz decompresses the file in palce. The original file is replaced with a xz decompressed version of itself. Error: Line too long (111 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:293 (Diff revision 5) > copy_file(src_file_abs_path, os.path.join(patch_info.work_dir, file_in_manifest_name)) > patch_info.archive_files.append('"' + file_in_manifest_name + '"') > > > def create_add_patch_for_file(to_marfile_entry, patch_info): > """ Copy the file to the working dir, add the add instruction, and add it to the list of archive files """ Error: Line too long (111 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:300 (Diff revision 5) > patch_info.append_add_instruction(to_marfile_entry.name) > patch_info.archive_files.append('"' + to_marfile_entry.name + '"') > > > def create_add_if_not_patch_for_file(to_marfile_entry, patch_info): > """ Copy the file to the working dir, add the add-if-not instruction, and add it to the list of archive files """ Error: Line too long (118 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:338 (Diff revision 5) > # manifests expects / for path separators on all platforms. > line = line.replace("\\", "/") > patch_info.append_remove_instruction(line) > > > def create_partial_patch(from_dir_path, to_dir_path, patch_filename, shas, patch_info, forced_updates, add_if_not_list): Error: Line too long (120 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:475 (Diff revision 5) > for example: firefox-3.0b3pre.en-US.linux-i686.complete.mar > Or linux-i686/en-US/firefox-3.0b3.complete.mar > Returns dict with keys product, version, locale, platform, type > """ > try: > m = re.search( Error: Indentation is not a multiple of four [flake8: E111] ::: tools/update-packaging/make_incremental_updates.py:476 (Diff revision 5) > Or linux-i686/en-US/firefox-3.0b3.complete.mar > Returns dict with keys product, version, locale, platform, type > """ > try: > m = re.search( > '(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)', Error: Line too long (126 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:477 (Diff revision 5) > Returns dict with keys product, version, locale, platform, type > """ > try: > m = re.search( > '(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)', > os.path.basename(filepath)) Error: Continuation line missing indentation or outdented [flake8: E122] ::: tools/update-packaging/make_incremental_updates.py:478 (Diff revision 5) > """ > try: > m = re.search( > '(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)', > os.path.basename(filepath)) > return m.groupdict() Error: Indentation is not a multiple of four [flake8: E111] ::: tools/update-packaging/make_incremental_updates.py:480 (Diff revision 5) > m = re.search( > '(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)', > os.path.basename(filepath)) > return m.groupdict() > except Exception as exc: > try: Error: Indentation is not a multiple of four [flake8: E111] ::: tools/update-packaging/make_incremental_updates.py:482 (Diff revision 5) > os.path.basename(filepath)) > return m.groupdict() > except Exception as exc: > try: > m = re.search( > '(?P<platform>.+?)\/(?P<locale>.+?)\/(?P<product>\w+)-(?P<version>\w+\.\w+)\.(?P<type>\w+).mar', Error: Line too long (106 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:483 (Diff revision 5) > return m.groupdict() > except Exception as exc: > try: > m = re.search( > '(?P<platform>.+?)\/(?P<locale>.+?)\/(?P<product>\w+)-(?P<version>\w+\.\w+)\.(?P<type>\w+).mar', > filepath) Error: Continuation line missing indentation or outdented [flake8: E122] ::: tools/update-packaging/make_incremental_updates.py:485 (Diff revision 5) > try: > m = re.search( > '(?P<platform>.+?)\/(?P<locale>.+?)\/(?P<product>\w+)-(?P<version>\w+\.\w+)\.(?P<type>\w+).mar', > filepath) > return m.groupdict() > except: Error: Do not use bare except' [flake8: E722] ::: tools/update-packaging/make_incremental_updates.py:485 (Diff revision 5) > try: > m = re.search( > '(?P<platform>.+?)\/(?P<locale>.+?)\/(?P<product>\w+)-(?P<version>\w+\.\w+)\.(?P<type>\w+).mar', > filepath) > return m.groupdict() > except: Error: Indentation is not a multiple of four [flake8: E111] ::: tools/update-packaging/make_incremental_updates.py:532 (Diff revision 5) > to_shasum = hashlib.sha1(open(to_filename, 'rb').read()).hexdigest() > to_size = str(os.path.getsize(to_filename)) > > mar_extract_time = time.time() > > partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, [ Error: Line too long (123 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:533 (Diff revision 5) > to_size = str(os.path.getsize(to_filename)) > > mar_extract_time = time.time() > > partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, [ > 'update.manifest', 'updatev2.manifest', 'updatev3.manifest'], []), forced_updates, ['channel-prefs.js', 'update-settings.ini']) Error: Line too long (179 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:554 (Diff revision 5) > 'to_version': to_decoded['version'], > 'from_version': from_decoded['version'], > 'locale': from_decoded['locale'], > 'platform': from_decoded['platform'], > }) > print("done with patch %s/%s time (%.2fs/%.2fs/%.2fs) (mar/patch/total)" % (str(patch_num), Error: Line too long (103 > 99 characters) [flake8: E501] ::: tools/update-packaging/make_incremental_updates.py:555 (Diff revision 5) > 'from_version': from_decoded['version'], > 'locale': from_decoded['locale'], > 'platform': from_decoded['platform'], > }) > print("done with patch %s/%s time (%.2fs/%.2fs/%.2fs) (mar/patch/total)" % (str(patch_num), > str(len(patches)), mar_extract_time - startTime, time.time() - mar_extract_time, time.time() - startTime)) Error: Line too long (194 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:36 (Diff revision 5) > self.assertEquals(['add "file.test"'], self.patch_info.manifestv3) > > def test_append_add_if_instruction(self): > self.patch_info.append_add_instruction('distribution/extensions/extension/file.test') > self.assertEquals( > ['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) Error: Line too long (133 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:38 (Diff revision 5) > def test_append_add_if_instruction(self): > self.patch_info.append_add_instruction('distribution/extensions/extension/file.test') > self.assertEquals( > ['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) > self.assertEquals( > ['add-if "distribution/extensions/extension" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv3) Error: Line too long (133 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:54 (Diff revision 5) > > def test_append_patch_if_instruction(self): > self.patch_info.append_patch_instruction( > 'distribution/extensions/extension/file.test', 'patchname') > self.assertEquals( > ['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) Error: Line too long (147 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:56 (Diff revision 5) > self.patch_info.append_patch_instruction( > 'distribution/extensions/extension/file.test', 'patchname') > self.assertEquals( > ['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv2) > self.assertEquals( > ['patch-if "distribution/extensions/extension" "patchname" "distribution/extensions/extension/file.test"'], self.patch_info.manifestv3) Error: Line too long (147 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:113 (Diff revision 5) > > class TestMakeIncrementalUpdates(unittest.TestCase): > def setUp(self): > work_dir = '.' > self.patch_info = PatchInfo( > work_dir, ['update.manifest', 'updatev2.manifest', 'updatev3.manifest'], ['/readme.txt']) Error: Line too long (101 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:135 (Diff revision 5) > > - def test_extract_mar(self): > + def test_extract_mar(self): > mkup.extract_mar('filename', 'work_dir') > > def test_create_partial_patch_for_file(self): > mkup.create_partial_patch_for_file('from_marfile_entry', 'to_marfile_entry', 'shas', self.patch_info) Error: Line too long (109 > 99 characters) [flake8: E501] ::: tools/update-packaging/test_make_incremental_updates.py:144 (Diff revision 5) > > - def test_process_explicit_remove_files(self): > + def test_process_explicit_remove_files(self): > mkup.process_explicit_remove_files('dir_path', self.patch_info) > > def test_create_partial_patch(self): > mkup.create_partial_patch('from_dir_path', 'to_dir_path', 'patch_filename', 'shas', self.patch_info, 'forced_updates') Error: Line too long (126 > 99 characters) [flake8: E501]
Comment 31•6 years ago
|
||
mozreview-review |
Comment on attachment 8959092 [details] Bug 1438839 - Finish the flake8 fixes on tools/ https://reviewboard.mozilla.org/r/227970/#review234228
Attachment #8959092 -
Flags: review?(ahalberstadt) → review+
Assignee | ||
Comment 32•6 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/7f66590787f94d709da68cfe8a40fd5d2cc2f0b9 Bug 1438839 - Add tools/ as part of the whitelist of flake8 r=ahal https://hg.mozilla.org/integration/mozilla-inbound/rev/b7b541ecc7478ba53953368cc974c544ce7a1861 Bug 1438839 - autopep8 -i --max-line-length 99 on the tools/ r=ahal https://hg.mozilla.org/integration/mozilla-inbound/rev/7985866da5d5cc055a6309eabcb954e372544baf Bug 1438839 - Fix the remaining flake8 issues by hand r=ahal https://hg.mozilla.org/integration/mozilla-inbound/rev/b86e592046e4c4b89883fe755945cc36cb613c77 Bug 1438839 - Finish the flake8 fixes on tools/ r=ahal
Comment 33•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7f66590787f9 https://hg.mozilla.org/mozilla-central/rev/b7b541ecc747 https://hg.mozilla.org/mozilla-central/rev/7985866da5d5 https://hg.mozilla.org/mozilla-central/rev/b86e592046e4
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Updated•6 years ago
|
status-firefox60:
affected → ---
Updated•1 year ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•