Commit graph

6 commits

Author SHA1 Message Date
Ana Maria Martinez Gomez
ab07022ff3
[copyright + license] Fix headers
Replace the header from source code files using the following script:
```Python
for dir_path, dir_names, file_names in os.walk("flare-floss"):
    for file_name in file_names:
        try:
            file_path = f"{dir_path}/{file_name}"
            f = open(file_path, "rb+")
            content = f.read()
            m = re.search(OLD_HEADER, content)
            if not m:
                continue
            print(f"{file_path}: {m.group('year')}")
            content = content.replace(m.group(0), NEW_HEADER % m.group("year"))
            f.seek(0)
            f.write(content)
        except:
            continue
```

Some files had the copyright headers inside a `"""` comment and needed
manual changes before applying the script.

The old header had the confusing sentence `All rights reserved`, which
does not make sense for an open source license. Replace the header by
the default Google header that corrects this issue and keep floss
consistent with other Google projects.
2025-01-14 17:52:22 +01:00
Diego Romeo
79bad31ea2 update code style with appropriate isort options 2023-06-27 21:44:20 +02:00
Diego Romeo
2d634ca84e adjust code style 2023-06-27 16:43:03 +02:00
Diego Romeo
0ec61e980b update type hints, args and return values type 2023-06-27 13:20:54 +02:00
Diego Romeo
30b28134b1 change os.path to pathlib.Path 2023-06-26 20:02:10 +02:00
Moritz Raabe
1f4bedda90 fixes and tests 2022-06-21 12:31:30 +02:00