Browse Source

move hapic.set_context method

Bastien Sevajol 6 years ago
parent
commit
50bdebfcce
1 changed files with 4 additions and 4 deletions
  1. 4 4
      hapic/hapic.py

+ 4 - 4
hapic/hapic.py View File

@@ -74,6 +74,10 @@ class Hapic(object):
74 74
     def context(self) -> ContextInterface:
75 75
         return self._context
76 76
 
77
+    def set_context(self, context: ContextInterface) -> None:
78
+        assert not self._context
79
+        self._context = context
80
+
77 81
     def with_api_doc(self):
78 82
         def decorator(func):
79 83
             @functools.wraps(func)
@@ -102,10 +106,6 @@ class Hapic(object):
102 106
 
103 107
         return decorator
104 108
 
105
-    def set_context(self, context: ContextInterface) -> None:
106
-        assert not self._context
107
-        self._context = context
108
-
109 109
     def output_body(
110 110
         self,
111 111
         schema: typing.Any,