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
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Upcoming Release (TBD)
======================

Features
--------
* Add LLM support.


Bug Fixes
--------
* Improve missing ssh-extras message.
Expand All @@ -9,6 +14,7 @@ Bug Fixes
Internal
--------
* Improve pull request template lint commands.
* Continue typehinting the non-test codebase.


1.37.1 (2025/07/28)
Expand Down
6 changes: 3 additions & 3 deletions mycli/clibuffer.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from typing import Callable
from __future__ import annotations

from prompt_toolkit.application import get_app
from prompt_toolkit.enums import DEFAULT_BUFFER
from prompt_toolkit.filters import Condition
from prompt_toolkit.filters import Condition, Filter

from mycli.packages.special import iocommands


def cli_is_multiline(mycli) -> Callable:
def cli_is_multiline(mycli) -> Filter:
@Condition
def cond():
doc = get_app().layout.get_buffer_by_name(DEFAULT_BUFFER).document
Expand Down
10 changes: 5 additions & 5 deletions mycli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from os.path import exists
import struct
import sys
from typing import IO, BinaryIO, Literal
from typing import IO, BinaryIO, Literal, TextIO

from configobj import ConfigObj, ConfigObjError
import pyaes
Expand All @@ -25,7 +25,7 @@ def log(logger: logging.Logger, level: int, message: str) -> None:
logger.log(level, message)


def read_config_file(f: str | TextIOWrapper, list_values: bool = True) -> ConfigObj | None:
def read_config_file(f: str | TextIO | TextIOWrapper, list_values: bool = True) -> ConfigObj | None:
"""Read a config file.

*list_values* set to `True` is the default behavior of ConfigObj.
Expand All @@ -52,7 +52,7 @@ def read_config_file(f: str | TextIOWrapper, list_values: bool = True) -> Config
return config


def get_included_configs(config_file: str | TextIOWrapper) -> list[str]:
def get_included_configs(config_file: str | TextIOWrapper) -> list[str | TextIOWrapper]:
"""Get a list of configuration files that are included into config_path
with !includedir directive.

Expand All @@ -64,7 +64,7 @@ def get_included_configs(config_file: str | TextIOWrapper) -> list[str]:
"""
if not isinstance(config_file, str) or not os.path.isfile(config_file):
return []
included_configs = []
included_configs: list[str | TextIOWrapper] = []

try:
with open(config_file) as f:
Expand All @@ -80,7 +80,7 @@ def get_included_configs(config_file: str | TextIOWrapper) -> list[str]:
return included_configs


def read_config_files(files: list[str], list_values: bool = True) -> ConfigObj:
def read_config_files(files: list[str | TextIOWrapper], list_values: bool = True) -> ConfigObj:
"""Read and merge a list of config files."""

config = create_default_config(list_values=list_values)
Expand Down
Loading