Skip to content

Commit 76b6b79

Browse files
committed
Move copyright and license as code comments
When generating the documentation, the License and Copyright text appears on every module. It might be confusing for users if the license applies to the code or the documentation. This commit just moves the copyright notice and license specification as a regular comment instead of putting it into the docstring that gets rendered as documentation. This was automatically adjusted using: ```sh find -name '*.py' -not -path './.*' \ | xargs sed -i '1 i\# License: MIT\n# Copyright © 2022 Frequenz Energy-as-a-Service GmbH\n' find -name '*.py' -not -path './.*' \ | xargs sed -zi 's/\n\?\(Copyright\|License\)\n[^\n]*\n\n\?//g' ``` Signed-off-by: Leandro Lucarella <[email protected]>
1 parent ab195fa commit 76b6b79

24 files changed

+72
-167
lines changed

benchmarks/benchmark_anycast.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
"""Benchmark for Anycast channels.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
23

3-
Copyright
4-
Copyright © 2022 Frequenz Energy-as-a-Service GmbH
5-
6-
License
7-
MIT
8-
"""
4+
"""Benchmark for Anycast channels."""
95

106
import asyncio
117
import csv

benchmarks/benchmark_broadcast.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
"""Benchmark for Broadcast channels.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
23

3-
Copyright
4-
Copyright © 2022 Frequenz Energy-as-a-Service GmbH
5-
6-
License
7-
MIT
8-
"""
4+
"""Benchmark for Broadcast channels."""
95

106
import asyncio
117
import csv

noxfile.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
"""Code quality checks.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
23

3-
Copyright
4-
Copyright © 2022 Frequenz Energy-as-a-Service GmbH
5-
6-
License
7-
MIT
8-
"""
4+
"""Code quality checks."""
95

106
import nox
117

src/frequenz/channels/__init__.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
"""Channel implementations.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
23

3-
Copyright
4-
Copyright © 2022 Frequenz Energy-as-a-Service GmbH
5-
6-
License
7-
MIT
8-
"""
4+
"""Channel implementations."""
95

106
from frequenz.channels.anycast import Anycast
117
from frequenz.channels.base_classes import BufferedReceiver, Peekable, Receiver, Sender

src/frequenz/channels/anycast.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
"""A channel for sending data across async tasks.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
23

3-
Copyright
4-
Copyright © 2022 Frequenz Energy-as-a-Service GmbH
5-
6-
License
7-
MIT
8-
"""
4+
"""A channel for sending data across async tasks."""
95

106
from asyncio import Condition
117
from collections import deque

src/frequenz/channels/base_classes.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
"""
2-
Baseclasses for Channel Sender and Receiver.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
33

4-
Copyright
5-
Copyright © 2022 Frequenz Energy-as-a-Service GmbH
6-
7-
License
8-
MIT
9-
"""
4+
"""Baseclasses for Channel Sender and Receiver."""
105

116
from abc import ABC, abstractmethod
127
from typing import Callable, Generic, Optional, TypeVar

src/frequenz/channels/bidirectional.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
"""An abstraction to provide bi-directional communication between actors.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
23

3-
Copyright
4-
Copyright © 2022 Frequenz Energy-as-a-Service GmbH
5-
6-
License
7-
MIT
8-
"""
4+
"""An abstraction to provide bi-directional communication between actors."""
95

106
from typing import Generic, Optional
117

src/frequenz/channels/broadcast.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
"""A channel to broadcast messages to all receivers.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
23

3-
Copyright
4-
Copyright © 2022 Frequenz Energy-as-a-Service GmbH
5-
6-
License
7-
MIT
8-
"""
4+
"""A channel to broadcast messages to all receivers."""
95

106
import logging
117
from asyncio import Condition

src/frequenz/channels/merge.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
"""Merge messages coming from channels into a single stream.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
23

3-
Copyright
4-
Copyright © 2022 Frequenz Energy-as-a-Service GmbH
5-
6-
License
7-
MIT
8-
"""
4+
"""Merge messages coming from channels into a single stream."""
95

106
import asyncio
117
from collections import deque

src/frequenz/channels/merge_named.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
"""Merge messages coming from channels into a single stream containing name of message.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
23

3-
Copyright
4-
Copyright © 2022 Frequenz Energy-as-a-Service GmbH
5-
6-
License
7-
MIT
8-
"""
4+
"""Merge messages coming from channels into a single stream containing name of message."""
95

106
import asyncio
117
from collections import deque

0 commit comments

Comments
 (0)