Skip to content

Commit aa47b69

Browse files
committed
black codestyle
1 parent 85e87df commit aa47b69

File tree

2 files changed

+11
-18
lines changed

2 files changed

+11
-18
lines changed

advanced_descriptors/advanced_property.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,7 @@ def fcget(self): # type: () -> typing.Optional[typing.Callable[[typing.Any, ],
216216
"""
217217
return self.__fcget
218218

219-
def getter(
220-
self, fget # type: typing.Optional[typing.Callable[[typing.Any, ], typing.Any]]
221-
): # type: (...) -> AdvancedProperty
219+
def getter(self, fget): # type: (typing.Optional[typing.Callable[[typing.Any, ], typing.Any]]) -> AdvancedProperty
222220
"""Descriptor to change the getter on a property.
223221
224222
:param fget: new normal getter.
@@ -230,8 +228,8 @@ def getter(
230228
return self
231229

232230
def setter(
233-
self, fset # type: typing.Optional[typing.Callable[[typing.Any, typing.Any], None]]
234-
): # type: (...) -> AdvancedProperty
231+
self, fset
232+
): # type: (typing.Optional[typing.Callable[[typing.Any, typing.Any], None]]) -> AdvancedProperty
235233
"""Descriptor to change the setter on a property.
236234
237235
:param fset: new setter.
@@ -242,9 +240,7 @@ def setter(
242240
self.__fset = fset
243241
return self
244242

245-
def deleter(
246-
self, fdel # type: typing.Optional[typing.Callable[[typing.Any, ], None]]
247-
): # type: (...) -> AdvancedProperty
243+
def deleter(self, fdel): # type: (typing.Optional[typing.Callable[[typing.Any, ], None]]) -> AdvancedProperty
248244
"""Descriptor to change the deleter on a property.
249245
250246
:param fdel: New deleter.
@@ -256,8 +252,8 @@ def deleter(
256252
return self
257253

258254
def cgetter(
259-
self, fcget # type: typing.Optional[typing.Callable[[typing.Any, ], typing.Any]]
260-
): # type: (...) -> AdvancedProperty
255+
self, fcget
256+
): # type: (typing.Optional[typing.Callable[[typing.Any, ], typing.Any]]) -> AdvancedProperty
261257
"""Descriptor to change the class wide getter on a property.
262258
263259
:param fcget: new class-wide getter.

advanced_descriptors/separate_class_method.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class SeparateClassMethod(object):
9595
def __init__(
9696
self,
9797
imeth=None, # type: typing.Optional[typing.Callable[..., typing.Any]]
98-
cmeth=None # type: typing.Optional[typing.Callable[..., typing.Any]]
98+
cmeth=None, # type: typing.Optional[typing.Callable[..., typing.Any]]
9999
): # type: (...) -> None
100100
"""Separate class method and instance methods.
101101
@@ -108,10 +108,8 @@ def __init__(
108108
self.__class_method = cmeth
109109

110110
def __get__(
111-
self,
112-
instance, # type: typing.Optional[typing.Any]
113-
owner # type: typing.Any
114-
): # type: (...) -> typing.Callable[..., typing.Any]
111+
self, instance, owner
112+
): # type: (typing.Optional[typing.Any], typing.Any) -> typing.Callable[..., typing.Any]
115113
"""Get descriptor.
116114
117115
:return: class method or instance method depends on call behavior
@@ -137,9 +135,8 @@ def instance_method(*args, **kwargs): # type: (typing.Any, typing.Any) -> typin
137135
return instance_method
138136

139137
def instance_method(
140-
self,
141-
imeth # type: typing.Optional[typing.Callable[..., typing.Any]]
142-
): # type: (...) -> SeparateClassMethod
138+
self, imeth
139+
): # type: (typing.Optional[typing.Callable[..., typing.Any]]) -> SeparateClassMethod
143140
"""Descriptor to change instance method.
144141
145142
:param imeth: New instance method.

0 commit comments

Comments
 (0)