[misc] 02/02: whitespace
Chris West
faux-guest at moszumanska.debian.org
Sat May 6 10:08:40 UTC 2017
This is an automated email from the git hooks/post-receive script.
faux-guest pushed a commit to branch master
in repository misc.
commit d9bb25ca88c78682eb4f1b8290aa09c6e4e53b4b
Author: Chris West (Faux) <git at goeswhere.com>
Date: Sat May 6 10:44:24 2017 +0100
whitespace
---
has-only.py | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/has-only.py b/has-only.py
index 794a227..8d0a389 100755
--- a/has-only.py
+++ b/has-only.py
@@ -2,15 +2,14 @@
import itertools
import json
-import sys
import re
-
-from typing import Iterator, Tuple, List, Optional
+import sys
+from typing import Iterator, Tuple, Optional
DO_FILE_PREFIX = '├── '
DO_DIFF_PREFIX = re.compile('(?:│ )+([+-])(.*)')
XXD_LINE = re.compile('[0-9a-f]{8}: (?:[0-9a-f]{4} ){8} (.{16})')
-XXD_END = re.compile('[0-9a-f]{8}: [0-9a-f]{2}(?:[0-9a-f]{2}| ) (?:[0-9a-f ]{4} ){7} (.{1,16})')
+XXD_END = re.compile('[0-9a-f]{8}: [0-9a-f]{2}(?:[0-9a-f]{2}| ) (?:[0-9a-f ]{4} ){7} (.{1,16})')
def diff_parse(lines):
@@ -67,12 +66,12 @@ def process(f):
has = set()
if file in {
- 'file list',
- 'md5sums',
- 'Files',
- './control',
- 'line order',
- 'zipinfo'}:
+ 'file list',
+ 'md5sums',
+ 'Files',
+ './control',
+ 'line order',
+ 'zipinfo'}:
# TODO: this is a massive approximation; ignores variations like deleting a file
continue
@@ -88,14 +87,15 @@ def process(f):
if 'readelf --wide --debug-dump=info {}' == file:
has.add('build_id')
- if file.endswith('.rdb') or file.endswith('.rdx') or file.endswith('.rds')\
+ if file.endswith('.rdb') or file.endswith('.rdx') or file.endswith('.rds') \
or file.endswith('.rdx-content'):
has.add('rdb')
yield (file, has, before, after)
- #if not has:
+ # if not has:
# raise Exception("unclassified: {}".format((file, before, after)))
+
def warn(path, msg):
sys.stderr.write('{}: {}\n'.format(path, msg))
@@ -106,12 +106,12 @@ def explain_build_path(file_problems: Iterator[Tuple[str, Tuple[str, ...]]]):
warn(path, 'unclassified problems')
return
- #if 1 == len(problems) and ('build_id',) in problems:
+ # if 1 == len(problems) and ('build_id',) in problems:
if 'build_path' not in (x for y in problems for x in y):
print(path)
-def find_interesting(file_problems: Iterator) -> Optional[Tuple]: # or something
+def find_interesting(file_problems: Iterator) -> Optional[Tuple]: # or something
for file, problems, before, after in file_problems:
if not problems:
return file, before, after
@@ -119,7 +119,6 @@ def find_interesting(file_problems: Iterator) -> Optional[Tuple]: # or something
return None
-
def main():
out = []
for path in sys.argv[1:]:
@@ -138,5 +137,6 @@ def main():
with open('intdiffs.json', 'w') as f:
json.dump(out, f)
+
if '__main__' == __name__:
main()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git
More information about the Reproducible-commits
mailing list