| Total Complexity | 0 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | from glob import glob |
||
| 2 | |||
| 3 | pincer_license = """# Copyright Pincer 2021-Present |
||
| 4 | # Full MIT License can be found in `LICENSE` at the project root. |
||
| 5 | |||
| 6 | """ |
||
| 7 | |||
| 8 | |||
| 9 | for file in glob("./pincer/**/*.py", recursive=True): |
||
| 10 | if file == "./pincer/__init__.py": |
||
| 11 | continue |
||
| 12 | |||
| 13 | with open(file, "r+") as f: |
||
| 14 | lines = f.readlines() |
||
| 15 | if not lines[0].startswith("# Copyright Pincer 2021-Present\n"): |
||
| 16 | lines.insert(0, pincer_license) |
||
| 17 | f.seek(0) |
||
| 18 | f.writelines(lines) |
||
| 19 |