Created
December 22, 2016 00:14
-
-
Save jairideout/0b0cec5146c807e6540c4c989146fef7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------------------------------------- | |
# Copyright (c) 2016--, QIIME 2 development team. | |
# | |
# Distributed under the terms of the Modified BSD License. | |
# | |
# The full license is in the file LICENSE, distributed with this software. | |
# ---------------------------------------------------------------------------- | |
import os | |
import os.path | |
def main(): | |
for dirpath, dirnames, filenames in os.walk('.'): | |
for filename in filenames: | |
filepath = os.path.join(dirpath, filename) | |
if not filepath.endswith('.py'): | |
continue | |
with open(filepath, 'r') as filehandle: | |
lines = ''.join(line for _, line in zip(range(7), filehandle)) | |
if lines != HEADER: | |
print('Invalid header: %s' % filepath) | |
HEADER = """\ | |
# ---------------------------------------------------------------------------- | |
# Copyright (c) 2016--, QIIME 2 development team. | |
# | |
# Distributed under the terms of the Modified BSD License. | |
# | |
# The full license is in the file LICENSE, distributed with this software. | |
# ---------------------------------------------------------------------------- | |
""" | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment