Skip to content

Commit c26ba7e

Browse files
committed
reformat with older version of yapf
1 parent 438d4b5 commit c26ba7e

27 files changed

+0
-66
lines changed

dbus_next/_private/marshaller.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44

55
class Marshaller:
6-
76
def __init__(self, signature, body):
87
self.signature_tree = SignatureTree._get(signature)
98
self.signature_tree.verify(body)

dbus_next/_private/util.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ def parse_annotation(annotation: str) -> str:
101101
In this case, we must eval the result which we do only when given a string
102102
constant.
103103
'''
104-
105104
def raise_value_error():
106105
raise ValueError(f'service annotations must be a string constant (got {annotation})')
107106

dbus_next/aio/message_bus.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def _future_set_result(fut, result):
2828

2929

3030
class _MessageWriter:
31-
3231
def __init__(self, bus):
3332
self.messages = Queue()
3433
self.negotiate_unix_fd = bus._negotiate_unix_fd
@@ -115,7 +114,6 @@ class MessageBus(BaseMessageBus):
115114
and receive messages.
116115
:vartype connected: bool
117116
"""
118-
119117
def __init__(self,
120118
bus_address: str = None,
121119
bus_type: BusType = BusType.SESSION,
@@ -348,7 +346,6 @@ def _make_method_handler(self, interface, method):
348346
return super()._make_method_handler(interface, method)
349347

350348
def handler(msg, send_reply):
351-
352349
def done(fut):
353350
with send_reply:
354351
result = fut.result()

dbus_next/aio/proxy_object.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ class ProxyInterface(BaseProxyInterface):
7272
If the service returns an error for a DBus call, a :class:`DBusError
7373
<dbus_next.DBusError>` will be raised with information about the error.
7474
"""
75-
7675
def _add_method(self, intr_method):
77-
7876
async def method_fn(*args, flags=MessageFlag.NONE):
7977
input_body, unix_fds = replace_fds_with_idx(intr_method.in_signature, list(args))
8078

@@ -108,7 +106,6 @@ async def method_fn(*args, flags=MessageFlag.NONE):
108106
setattr(self, method_name, method_fn)
109107

110108
def _add_property(self, intr_property):
111-
112109
async def property_getter():
113110
msg = await self.bus.call(
114111
Message(destination=self.bus_name,
@@ -154,7 +151,6 @@ class ProxyObject(BaseProxyObject):
154151
155152
For more information, see the :class:`BaseProxyObject <dbus_next.proxy_object.BaseProxyObject>`.
156153
"""
157-
158154
def __init__(self, bus_name: str, path: str, introspection: Union[intr.Node, str, ET.Element],
159155
bus: BaseMessageBus):
160156
super().__init__(bus_name, path, introspection, bus, ProxyInterface)

dbus_next/auth.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class Authenticator:
3535
3636
:seealso: https://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol
3737
"""
38-
3938
def _authentication_start(self, negotiate_unix_fd=False):
4039
raise NotImplementedError(
4140
'authentication_start() must be implemented in the inheriting class')
@@ -54,7 +53,6 @@ class AuthExternal(Authenticator):
5453
5554
:sealso: https://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol
5655
"""
57-
5856
def __init__(self):
5957
self.negotiate_unix_fd = False
6058
self.negotiating_fds = False
@@ -86,7 +84,6 @@ class AuthAnnonymous(Authenticator):
8684
8785
:sealso: https://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol
8886
"""
89-
9087
def _authentication_start(self, negotiate_unix_fd=False) -> str:
9188
if negotiate_unix_fd:
9289
raise AuthError(

dbus_next/errors.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,21 @@ class SignalDisabledError(Exception):
3131

3232

3333
class InvalidBusNameError(TypeError):
34-
3534
def __init__(self, name):
3635
super().__init__(f'invalid bus name: {name}')
3736

3837

3938
class InvalidObjectPathError(TypeError):
40-
4139
def __init__(self, path):
4240
super().__init__(f'invalid object path: {path}')
4341

4442

4543
class InvalidInterfaceNameError(TypeError):
46-
4744
def __init__(self, name):
4845
super().__init__(f'invalid interface name: {name}')
4946

5047

5148
class InvalidMemberNameError(TypeError):
52-
5349
def __init__(self, member):
5450
super().__init__(f'invalid member name: {member}')
5551

@@ -60,7 +56,6 @@ def __init__(self, member):
6056

6157

6258
class DBusError(Exception):
63-
6459
def __init__(self, type_, text, reply=None):
6560
super().__init__(text)
6661

dbus_next/glib/message_bus.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class _GLibSource:
2424

2525

2626
class _MessageSource(_GLibSource):
27-
2827
def __init__(self, bus):
2928
self.unmarshaller = None
3029
self.bus = bus
@@ -55,7 +54,6 @@ def dispatch(self, callback, user_data):
5554

5655

5756
class _MessageWritableSource(_GLibSource):
58-
5957
def __init__(self, bus):
6058
self.bus = bus
6159
self.buf = b''
@@ -101,7 +99,6 @@ def dispatch(self, callback, user_data):
10199

102100

103101
class _AuthLineSource(_GLibSource):
104-
105102
def __init__(self, stream):
106103
self.stream = stream
107104
self.buf = b''
@@ -149,7 +146,6 @@ class MessageBus(BaseMessageBus):
149146
be :class:`None` until the message bus connects.
150147
:vartype unique_name: str
151148
"""
152-
153149
def __init__(self,
154150
bus_address: str = None,
155151
bus_type: BusType = BusType.SESSION,
@@ -178,7 +174,6 @@ def connect(self, connect_notify: Callable[['MessageBus', Optional[Exception]],
178174
:class:`AuthError <dbus_next.AuthError>` on authorization errors.
179175
:type callback: :class:`Callable`
180176
"""
181-
182177
def authenticate_notify(exc):
183178
if exc is not None:
184179
if connect_notify is not None:

dbus_next/glib/proxy_object.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ def set_callback(error: Exception)
108108
:class:`DBusError <dbus_next.DBusError>` will be raised with information
109109
about the error.
110110
"""
111-
112111
def _add_method(self, intr_method):
113112
in_len = len(intr_method.in_args)
114113
out_len = len(intr_method.out_args)
@@ -177,9 +176,7 @@ def callback(body, err):
177176
setattr(self, method_name_sync, method_fn_sync)
178177

179178
def _add_property(self, intr_property):
180-
181179
def property_getter(callback):
182-
183180
def call_notify(msg, err):
184181
if err:
185182
callback(None, err)
@@ -229,7 +226,6 @@ def callback(value, err):
229226
return property_value
230227

231228
def property_setter(value, callback):
232-
233229
def call_notify(msg, err):
234230
if err:
235231
callback(None, err)
@@ -279,7 +275,6 @@ class ProxyObject(BaseProxyObject):
279275
280276
For more information, see the :class:`BaseProxyObject <dbus_next.proxy_object.BaseProxyObject>`.
281277
"""
282-
283278
def __init__(self, bus_name: str, path: str, introspection: Union[intr.Node, str, ET.Element],
284279
bus: BaseMessageBus):
285280
super().__init__(bus_name, path, introspection, bus, ProxyInterface)

dbus_next/introspection.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class Arg:
2828
- :class:`InvalidSignatureError <dbus_next.InvalidSignatureError>` - If the signature is not valid.
2929
- :class:`InvalidIntrospectionError <dbus_next.InvalidIntrospectionError>` - If the signature is not a single complete type.
3030
"""
31-
3231
def __init__(self,
3332
signature: Union[SignatureType, str],
3433
direction: List[ArgDirection] = None,
@@ -101,7 +100,6 @@ class Signal:
101100
:raises:
102101
- :class:`InvalidMemberNameError <dbus_next.InvalidMemberNameError>` - If the name of the signal is not a valid member name.
103102
"""
104-
105103
def __init__(self, name: str, args: List[Arg] = None):
106104
if name is not None:
107105
assert_member_name_valid(name)
@@ -165,7 +163,6 @@ class Method:
165163
:raises:
166164
- :class:`InvalidMemberNameError <dbus_next.InvalidMemberNameError>` - If the name of this method is not valid.
167165
"""
168-
169166
def __init__(self, name: str, in_args: List[Arg] = [], out_args: List[Arg] = []):
170167
assert_member_name_valid(name)
171168

@@ -238,7 +235,6 @@ class Property:
238235
- :class `InvalidSignatureError <dbus_next.InvalidSignatureError>` - If the given signature is not valid.
239236
- :class: `InvalidMemberNameError <dbus_next.InvalidMemberNameError>` - If the member name is not valid.
240237
"""
241-
242238
def __init__(self,
243239
name: str,
244240
signature: str,
@@ -305,7 +301,6 @@ class Interface:
305301
:raises:
306302
- :class:`InvalidInterfaceNameError <dbus_next.InvalidInterfaceNameError>` - If the name is not a valid interface name.
307303
"""
308-
309304
def __init__(self,
310305
name: str,
311306
methods: List[Method] = None,
@@ -389,7 +384,6 @@ class Node:
389384
:raises:
390385
- :class:`InvalidIntrospectionError <dbus_next.InvalidIntrospectionError>` - If the name is not a valid node name.
391386
"""
392-
393387
def __init__(self, name: str = None, interfaces: List[Interface] = None, is_root: bool = True):
394388
if not is_root and not name:
395389
raise InvalidIntrospectionError('child nodes must have a "name" attribute')

dbus_next/message.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ class Message:
6161
- :class:`InvalidMemberNameError` - If ``member`` is not a valid member name.
6262
- :class:`InvalidInterfaceNameError` - If ``error_name`` or ``interface`` is not a valid interface name.
6363
"""
64-
6564
def __init__(self,
6665
destination: str = None,
6766
path: str = None,

0 commit comments

Comments
 (0)