flake8 linting
This commit is contained in:
@@ -1,23 +1,20 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import typing
|
||||
import uuid
|
||||
|
||||
import trio
|
||||
|
||||
import capport.comm.hub
|
||||
import capport.comm.message
|
||||
import capport.config
|
||||
import capport.database
|
||||
import capport.utils.cli
|
||||
import capport.utils.nft_set
|
||||
import trio
|
||||
from capport import cptypes
|
||||
from capport.utils.sd_notify import open_sdnotify
|
||||
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ControlApp(capport.comm.hub.HubApplication):
|
||||
hub: capport.comm.hub.Hub
|
||||
|
||||
@@ -25,10 +22,18 @@ class ControlApp(capport.comm.hub.HubApplication):
|
||||
super().__init__()
|
||||
self.nft_set = capport.utils.nft_set.NftSet()
|
||||
|
||||
async def mac_states_changed(self, *, from_peer_id: uuid.UUID, pending_updates: capport.database.PendingUpdates) -> None:
|
||||
async def mac_states_changed(
|
||||
self,
|
||||
*,
|
||||
from_peer_id: uuid.UUID,
|
||||
pending_updates: capport.database.PendingUpdates,
|
||||
) -> None:
|
||||
self.apply_db_entries(pending_updates.changes())
|
||||
|
||||
def apply_db_entries(self, entries: typing.Iterable[typing.Tuple[cptypes.MacAddress, capport.database.MacEntry]]) -> None:
|
||||
def apply_db_entries(
|
||||
self,
|
||||
entries: typing.Iterable[typing.Tuple[cptypes.MacAddress, capport.database.MacEntry]],
|
||||
) -> None:
|
||||
# deploy changes to netfilter set
|
||||
inserts = []
|
||||
removals = []
|
||||
|
||||
Reference in New Issue
Block a user