Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/png.py

Issue 2136793002: Remove all unused variables. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (C) 2012 Balazs Ankes (bank@inf.u-szeged.hu) University of Szeged 1 # Copyright (C) 2012 Balazs Ankes (bank@inf.u-szeged.hu) University of Szeged
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions 4 # modification, are permitted provided that the following conditions
5 # are met: 5 # are met:
6 # 1. Redistributions of source code must retain the above copyright 6 # 1. Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # 2. Redistributions in binary form must reproduce the above copyright 8 # 2. Redistributions in binary form must reproduce the above copyright
9 # notice, this list of conditions and the following disclaimer in the 9 # notice, this list of conditions and the following disclaimer in the
10 # documentation and/or other materials provided with the distribution. 10 # documentation and/or other materials provided with the distribution.
(...skipping 24 matching lines...) Expand all
35 35
36 categories = set(['image/png']) 36 categories = set(['image/png'])
37 37
38 def __init__(self, file_path, handle_style_error, host=None): 38 def __init__(self, file_path, handle_style_error, host=None):
39 self._file_path = file_path 39 self._file_path = file_path
40 self._handle_style_error = handle_style_error 40 self._handle_style_error = handle_style_error
41 self._host = host or SystemHost() 41 self._host = host or SystemHost()
42 self._fs = self._host.filesystem 42 self._fs = self._host.filesystem
43 43
44 def check(self, inline=None): 44 def check(self, inline=None):
45 errorstr = ""
46 config_file_path = ""
47
48 if self._fs.exists(self._file_path) and self._file_path.endswith("-expec ted.png"): 45 if self._fs.exists(self._file_path) and self._file_path.endswith("-expec ted.png"):
49 with self._fs.open_binary_file_for_reading(self._file_path) as fileh andle: 46 with self._fs.open_binary_file_for_reading(self._file_path) as fileh andle:
50 if not read_checksum_from_png.read_checksum(filehandle): 47 if not read_checksum_from_png.read_checksum(filehandle):
51 self._handle_style_error( 48 self._handle_style_error(
52 0, 'image/png', 5, "Image lacks a checksum. Generate png s using run-webkit-tests to ensure they have a checksum.") 49 0, 'image/png', 5, "Image lacks a checksum. Generate png s using run-webkit-tests to ensure they have a checksum.")
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698