b29d65416481efe627ee832e9f7e6646edcd81a6,tests/python/pants_test/test_utf8_header.py,Utf8HeaderTest,test_file_have_coding_utf8,#Utf8HeaderTest#,16
Before Change
nonconforming_files = []
for root, dirs, files in os.walk(buildroot):
// build-support contains a lot of external files.
if root.find(os.sep + "build-support") >= 0:
continue
for filename in files:
if filename.endswith(".py"):
path = root + os.sep + filename ;
with open(path, "r") as pyFile:
firstLine = pyFile.readline()
if not firstLine.rstrip() == "// coding=utf-8":
After Change
return (not tgt.is_synthetic) and tgt.is_original and tgt.has_sources(".py")
nonconforming_files = []
for target in build_file_parser.scan().targets(has_hand_coded_python_files):
for src in target.sources_relative_to_buildroot():
with open(os.path.join(get_buildroot(), src), "r") as python_file:
first_line = python_file.readline()
if not first_line.rstrip() == "// coding=utf-8":
nonconforming_files.append(src)
if len(nonconforming_files) > 0:
self.fail("Expected these files to contain first line "// coding=utf8": "
+ str(nonconforming_files))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: pantsbuild/pants
Commit Name: b29d65416481efe627ee832e9f7e6646edcd81a6
Time: 2014-06-16
Author: john.sirois@gmail.com
File Name: tests/python/pants_test/test_utf8_header.py
Class Name: Utf8HeaderTest
Method Name: test_file_have_coding_utf8
Project Name: PIQuIL/QuCumber
Commit Name: e7491685c122fd987947a7e9b0c0df4151aa0132
Time: 2018-07-29
Author: gtorlai@uwaterloo.ca
File Name: qucumber/quantum_reconstruction.py
Class Name: QuantumReconstruction
Method Name: fit
Project Name: keras-team/keras
Commit Name: 523e24e8acf8ecc6d6b31e78cdc6e4c3967bbbdb
Time: 2016-02-07
Author: francois.chollet@gmail.com
File Name: keras/backend/theano_backend.py
Class Name:
Method Name: rnn