diff options
-rw-r--r-- | kvmd/apps/ipmi/__init__.py | 1 | ||||
-rw-r--r-- | kvmd/apps/kvmd/__init__.py | 2 | ||||
-rw-r--r-- | kvmd/apps/vnc/__init__.py | 1 | ||||
-rw-r--r-- | kvmd/yamlconf/__init__.py | 2 | ||||
-rw-r--r-- | testenv/linters/pylint.ini | 5 | ||||
-rw-r--r-- | testenv/tests/apps/kvmd/test_auth.py | 2 | ||||
-rw-r--r-- | testenv/tests/plugins/auth/__init__.py | 2 |
7 files changed, 7 insertions, 8 deletions
diff --git a/kvmd/apps/ipmi/__init__.py b/kvmd/apps/ipmi/__init__.py index 52145337..749f9750 100644 --- a/kvmd/apps/ipmi/__init__.py +++ b/kvmd/apps/ipmi/__init__.py @@ -41,7 +41,6 @@ def main(argv: Optional[List[str]]=None) -> None: argv=argv, )[2].ipmi - # pylint: disable=protected-access IpmiServer( auth_manager=IpmiAuthManager(**config.auth._unpack()), kvmd=KvmdClient( diff --git a/kvmd/apps/kvmd/__init__.py b/kvmd/apps/kvmd/__init__.py index e0b0024b..24a09560 100644 --- a/kvmd/apps/kvmd/__init__.py +++ b/kvmd/apps/kvmd/__init__.py @@ -43,8 +43,6 @@ from .server import KvmdServer # ===== def main(argv: Optional[List[str]]=None) -> None: - # pylint: disable=protected-access - config = init( prog="kvmd", description="The main Pi-KVM daemon", diff --git a/kvmd/apps/vnc/__init__.py b/kvmd/apps/vnc/__init__.py index 923ac39a..534768a3 100644 --- a/kvmd/apps/vnc/__init__.py +++ b/kvmd/apps/vnc/__init__.py @@ -44,7 +44,6 @@ def main(argv: Optional[List[str]]=None) -> None: user_agent = htclient.make_user_agent("KVMD-VNC") - # pylint: disable=protected-access VncServer( host=config.server.host, port=config.server.port, diff --git a/kvmd/yamlconf/__init__.py b/kvmd/yamlconf/__init__.py index 9de5bee3..eea9e231 100644 --- a/kvmd/yamlconf/__init__.py +++ b/kvmd/yamlconf/__init__.py @@ -80,7 +80,7 @@ class Section(dict): for (key, value) in self.items(): if key not in ignore: if isinstance(value, Section): - unpacked[key] = value._unpack() # pylint: disable=protected-access + unpacked[key] = value._unpack() else: # Option unpacked[self._get_unpack_as(key)] = value # pylint: disable=protected-access return unpacked diff --git a/testenv/linters/pylint.ini b/testenv/linters/pylint.ini index 2d0f3de8..1d273038 100644 --- a/testenv/linters/pylint.ini +++ b/testenv/linters/pylint.ini @@ -33,7 +33,10 @@ disable = no-else-return, len-as-condition, raise-missing-from, - protected-access, + +[CLASSES] +exclude-protected = + _unpack, [REPORTS] msg-template = {symbol} -- {path}:{line}({obj}): {msg} diff --git a/testenv/tests/apps/kvmd/test_auth.py b/testenv/tests/apps/kvmd/test_auth.py index 66e54dca..15a7e1e3 100644 --- a/testenv/tests/apps/kvmd/test_auth.py +++ b/testenv/tests/apps/kvmd/test_auth.py @@ -43,7 +43,7 @@ from kvmd.plugins.auth import get_auth_service_class def _make_service_kwargs(path: str) -> Dict: cls = get_auth_service_class("htpasswd") scheme = cls.get_plugin_options() - return make_config({"file": path}, scheme)._unpack() # pylint: disable=protected-access + return make_config({"file": path}, scheme)._unpack() @contextlib.asynccontextmanager diff --git a/testenv/tests/plugins/auth/__init__.py b/testenv/tests/plugins/auth/__init__.py index 7d0d0fb4..48bf16e5 100644 --- a/testenv/tests/plugins/auth/__init__.py +++ b/testenv/tests/plugins/auth/__init__.py @@ -36,7 +36,7 @@ from kvmd.plugins.auth import get_auth_service_class async def get_configured_auth_service(name: str, **kwargs: Any) -> AsyncGenerator[BaseAuthService, None]: service_class = get_auth_service_class(name) config = make_config(kwargs, service_class.get_plugin_options()) - service = service_class(**config._unpack()) # pylint: disable=protected-access + service = service_class(**config._unpack()) try: yield service finally: |