Skip to content

Commit

Permalink
removed py36 compat stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
maxme1 committed Jun 27, 2023
1 parent 9713985 commit 5bff8d5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
14 changes: 0 additions & 14 deletions connectome/interface/compat.py

This file was deleted.

3 changes: 1 addition & 2 deletions connectome/interface/metaclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@

from ..layers import CallableLayer, Layer
from ..utils import MultiDict
from .compat import SafeMeta
from .factory import GraphFactory, SourceFactory, TransformFactory, add_from_mixins, add_quals, items_to_container

logger = logging.getLogger(__name__)
BASES: Dict[Type[Layer], GraphFactory] = {}


class APIMeta(SafeMeta):
class APIMeta(type):
@classmethod
def __prepare__(mcs, *args, **kwargs):
return MultiDict()
Expand Down
2 changes: 1 addition & 1 deletion connectome/layers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def _decorate(self, inputs: StringsLike, outputs: StringsLike = None, final: Str
def decorator(func: Callable) -> Callable:
loopback = self._container.loopback(func, inputs, outputs).compile()
logger.info('Loopback compiled: %s', loopback.fields())
return loopback[final]
return loopback.compile(final)

return decorator

Expand Down
3 changes: 2 additions & 1 deletion tests/test_interface/test_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ def test_optional(block_maker):
assert optional.first_optional(10) == 11
assert optional.second_optional(10) == '10'

func = optional._container.loopback(lambda x: x, 'first_optional', 'first_optional').compile()['first_optional']
func = optional._container.loopback(
lambda x: x, 'first_optional', 'first_optional').compile().compile('first_optional')
assert func(100500) == 100500


Expand Down

0 comments on commit 5bff8d5

Please sign in to comment.