Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #302

Merged
merged 2 commits into from
Feb 4, 2025
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ ci:
autoupdate_schedule: monthly
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.4
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.30.0
rev: 0.31.1
hooks:
- id: check-github-workflows
- id: check-readthedocs
Expand Down
8 changes: 3 additions & 5 deletions src/doitlive/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def run(
py_command = commands[i].rstrip()
except IndexError as error:
raise SessionError(
f"Unmatched {shell_name} code block in " "session file."
f"Unmatched {shell_name} code block in session file."
) from error
i += 1
if py_command.startswith("```"):
Expand Down Expand Up @@ -328,7 +328,7 @@ def completion():
)
else:
echo(
"Please ensure that the {SHELL} environment " "variable is set.".format(
"Please ensure that the {SHELL} environment variable is set.".format(
SHELL=style("SHELL", bold=True)
)
)
Expand Down Expand Up @@ -358,9 +358,7 @@ def completion():
"-S",
metavar="<shell>",
default=get_default_shell,
help=(
"The shell to use. " "[default: $DOITLIVE_INTERPRETER or $SHELL or /bin/bash]"
),
help=("The shell to use. [default: $DOITLIVE_INTERPRETER or $SHELL or /bin/bash]"),
show_default=False,
)

Expand Down
4 changes: 1 addition & 3 deletions src/doitlive/python_consoles.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ def interact(self, banner=None):
sys.ps2 # noqa: B018
except AttributeError:
sys.ps2 = "... "
cprt = (
'Type "help", "copyright", "credits" or "license" for ' "more information."
)
cprt = 'Type "help", "copyright", "credits" or "license" for more information.'
if banner is None:
self.write(f"Python {sys.version} on {sys.platform}\n{cprt}\n")
else:
Expand Down
8 changes: 3 additions & 5 deletions src/doitlive/styling.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,15 @@
("default", "{user.cyan.bold}@{hostname.blue}:{dir.green} $"),
(
"sorin",
"{cwd.blue} {vcs_branch.cyan} "
"{r_angle.red}{r_angle.yellow}{r_angle.green}",
"{cwd.blue} {vcs_branch.cyan} {r_angle.red}{r_angle.yellow}{r_angle.green}",
),
("stev", "{cwd.blue} {vcs_branch.cyan} " "{r_angle.green}"),
("stev", "{cwd.blue} {vcs_branch.cyan} {r_angle.green}"),
("damoekri", "{dir.cyan} {r_angle.green}"),
("smiley", "{vcs_branch.blue.paren}{dir.white.bold} {TTY.GREEN}ツ{TTY.RESET}"),
("nicolauj", "{r_angle.white}"),
(
"steeef",
"{user.red} at {hostname.yellow} in {cwd.green} "
"{vcs_branch.cyan.paren}\n$",
"{user.red} at {hostname.yellow} in {cwd.green} {vcs_branch.cyan.paren}\n$",
),
("redhat", "[{user}@{hostname} {dir}]$"),
("redhat_color", "[{user.red.bold}@{hostname.red} {dir.blue}]$"),
Expand Down