Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit ba1ba79

Browse files
committed
[license] having a minimal license header.
1 parent b0faa9c commit ba1ba79

9 files changed

Lines changed: 50 additions & 20 deletions

cloudstate/cloudstate.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
5+
16
from dataclasses import (dataclass, field)
27
from typing import List
38
import os
@@ -25,7 +30,7 @@ def register_event_sourced_entity(self, entity: EventSourcedEntity):
2530
def start(self):
2631
server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
2732
add_EntityDiscoveryServicer_to_server(CloudStateEntityDiscoveryServicer(self.event_sourced_entities), server)
28-
add_EventSourcedServicer_to_server(CloudStateEventSourcedServicer(self.event_sourced_entities),server)
33+
add_EventSourcedServicer_to_server(CloudStateEventSourcedServicer(self.event_sourced_entities), server)
2934
port = os.environ.get('HOST', '127.0.0.1') + ':' + os.environ.get('PORT', '8080')
3035
server.add_insecure_port(port)
3136
pprint('Starting Cloudstate on ' + port)

cloudstate/contexts.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
5+
16
from dataclasses import dataclass, field
27
from typing import List
38

cloudstate/discovery_servicer.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
# Copyright 2019 Lightbend Inc.
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
145

156
import platform
167
from dataclasses import dataclass

cloudstate/evensourced_servicer.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
from dataclasses import dataclass
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
5+
6+
import logging
7+
from pprint import pprint
28
from typing import List
39

10+
from google.protobuf import symbol_database as _symbol_database
411
from google.protobuf.any_pb2 import Any
512

613
from cloudstate.entity_pb2 import Command
@@ -9,9 +16,6 @@
916
from cloudstate.event_sourced_pb2 import EventSourcedInit, EventSourcedSnapshot, EventSourcedEvent, EventSourcedReply, \
1017
EventSourcedStreamOut
1118
from cloudstate.event_sourced_pb2_grpc import EventSourcedServicer
12-
from pprint import pprint
13-
from google.protobuf import symbol_database as _symbol_database
14-
import logging
1519

1620
_sym_db = _symbol_database.Default()
1721

cloudstate/event_sourced_context.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
5+
16
from dataclasses import dataclass, field
27
from typing import List, Any
38

cloudstate/event_sourced_entity.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
5+
16
from dataclasses import dataclass, field
27
from typing import List, Callable, Any, Mapping, MutableMapping
38
import inspect
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# content of test_sample.py
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
5+
6+
27
def inc(x):
38
return x + 1
49

510

611
def test_answer():
7-
assert inc(3) == 4
12+
assert inc(3) == 4

shoppingcart/shopping_cart.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
5+
16
from cloudstate.cloudstate import CloudState
27
from shoppingcart.shopping_cart_entity import entity as shopping_cart_entity
38
import logging

shoppingcart/shopping_cart_entity.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
5+
16
from dataclasses import dataclass, field
27
from typing import MutableMapping
38

0 commit comments

Comments
 (0)