mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
quality: fix obvious linter issues
This commit is contained in:
parent
91f4e5fa42
commit
b7882c9323
3 changed files with 6 additions and 7 deletions
|
@ -39,7 +39,6 @@ if TYPE_CHECKING:
|
|||
from yunohost.log import OperationLogger
|
||||
from yunohost.utils.configpanel import (
|
||||
ConfigPanelGetMode,
|
||||
ConfigPanelModel,
|
||||
RawConfig,
|
||||
RawSettings,
|
||||
)
|
||||
|
|
|
@ -54,7 +54,7 @@ from pydantic.types import constr
|
|||
|
||||
from moulinette import Moulinette, m18n
|
||||
from moulinette.interfaces.cli import colorize
|
||||
from moulinette.utils.filesystem import read_file, read_yaml, write_to_file
|
||||
from moulinette.utils.filesystem import read_yaml, write_to_file
|
||||
from yunohost.log import OperationLogger
|
||||
from yunohost.utils.error import YunohostError, YunohostValidationError
|
||||
from yunohost.utils.i18n import _value_for_locale
|
||||
|
@ -749,7 +749,7 @@ class BaseStringOption(BaseInputOption):
|
|||
|
||||
|
||||
class StringOption(BaseStringOption):
|
||||
"""
|
||||
r"""
|
||||
Ask for a simple string.
|
||||
|
||||
#### Example
|
||||
|
@ -1250,7 +1250,7 @@ class URLOption(BaseStringOption):
|
|||
|
||||
|
||||
class FileOption(BaseInputOption):
|
||||
"""
|
||||
r"""
|
||||
Ask for file.
|
||||
Renders a file prompt in the web-admin and ask for a path in CLI.
|
||||
|
||||
|
@ -1306,7 +1306,7 @@ class FileOption(BaseInputOption):
|
|||
shutil.rmtree(upload_dir)
|
||||
|
||||
@classmethod
|
||||
def _base_value_post_validator(cls, value: Any, field: "ModeField") -> str:
|
||||
def _base_value_post_validator(cls, value: Any, field: "ModelField") -> str:
|
||||
import mimetypes
|
||||
from pathlib import Path
|
||||
from magic import Magic
|
||||
|
|
|
@ -80,11 +80,11 @@ class LDAPInterface:
|
|||
|
||||
if user is None:
|
||||
if os.getuid() == 0:
|
||||
logger.debug(f"initializing root ldap interface")
|
||||
logger.debug("initializing root ldap interface")
|
||||
self.userdn = ROOTDN
|
||||
self._connect = lambda con: con.sasl_non_interactive_bind_s("EXTERNAL")
|
||||
else:
|
||||
logger.debug(f"initializing anonymous ldap interface")
|
||||
logger.debug("initializing anonymous ldap interface")
|
||||
self.userdn = ""
|
||||
self._connect = lambda con: None
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue