Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sopel/config/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ def configure_setting(self, name, prompt, default=NO_DEFAULT):
attribute = getattr(self.__class__, name)
if default is NO_DEFAULT and not attribute.is_secret:
try:
# get current value of this setting to use as prompt default
default = getattr(self, name)
except AttributeError:
# there is no current value; that's OK
pass
except ValueError:
print('The configured value for this option was invalid.')
Expand Down
3 changes: 3 additions & 0 deletions sopel/formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
'CONTROL_STRIKETHROUGH',
'CONTROL_MONOSPACE',
'CONTROL_REVERSE',
# convenience lists
'CONTROL_FORMATTING',
'CONTROL_NON_PRINTING',
# utility functions
'color',
'hex_color',
Expand Down
4 changes: 0 additions & 4 deletions sopel/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@
from . import time, web # NOQA


# Can be implementation-dependent
_regex_type = type(re.compile(''))


# Long kept for Python compatibility, but it's time we let these go.
raw_input = deprecated( # pragma: no cover
'Use the `input` function directly.',
Expand Down
4 changes: 2 additions & 2 deletions sopel/tools/memories.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

from collections import defaultdict
import threading
import typing
from typing import TYPE_CHECKING

from .identifiers import Identifier

if typing.TYPE_CHECKING:
if TYPE_CHECKING:
from typing import Callable, Optional

IdentifierFactory = Callable[[str], Identifier]
Expand Down