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