Skip to content

Commit

Permalink
chore: fix ruff linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
max-moser committed Feb 26, 2025
1 parent 53afba3 commit 323ab85
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 16 deletions.
2 changes: 0 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

from __future__ import print_function

import sphinx.environment

from invenio_cli import __version__

# -- General configuration ------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions invenio_cli/cli/translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ def update(cli_config):
output_dir=cli_config.get_project_dir() / Path("translations/"),
input_file=cli_config.get_project_dir() / Path("translations/messages.pot"),
)
on_fail = f"Failed to update message catalog."
on_success = f"Message catalog updated successfully."
on_fail = "Failed to update message catalog."
on_success = "Message catalog updated successfully."

run_steps(steps, on_fail, on_success)

Expand Down
2 changes: 0 additions & 2 deletions invenio_cli/commands/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
"""Invenio module to ease the creation and management of applications."""

import subprocess
import sys
from pathlib import Path

import click
from pynpm import NPMPackage, PNPMPackage

from ..helpers import env
from ..helpers.process import ProcessResponse, run_interactive
Expand Down
1 change: 0 additions & 1 deletion invenio_cli/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

"""Invenio module to ease the creation and management of applications."""

import sys

from ..helpers import filesystem
from ..helpers.process import run_cmd
Expand Down
1 change: 0 additions & 1 deletion invenio_cli/commands/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import os
import signal
import sys
from distutils.dir_util import copy_tree
from os import environ
from pathlib import Path
Expand Down
1 change: 0 additions & 1 deletion invenio_cli/commands/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

"""Invenio module to ease the creation and management of applications."""

import sys
from os import listdir

from ..helpers.cli_config import CLIConfig
Expand Down
5 changes: 2 additions & 3 deletions invenio_cli/commands/requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
import json
import re
import sys
from os import listdir

from ..helpers.docker_helper import DockerHelper
from ..helpers.process import ProcessResponse, run_cmd, run_interactive
from ..helpers.process import ProcessResponse, run_cmd
from ..helpers.rdm import rdm_version
from .steps import FunctionStep

Expand Down Expand Up @@ -187,7 +186,7 @@ def check_pipenv_installed(cls):
return ProcessResponse(
output=f"Pipenv OK. Got version {version}.", status_code=0
)
except Exception as err:
except Exception:
return ProcessResponse(
error=f"Pipenv not found. Got {result.error}.", status_code=1
)
Expand Down
5 changes: 2 additions & 3 deletions invenio_cli/commands/translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

"""Invenio module to ease the creation and management of applications."""

from pathlib import Path

from ..commands import Commands
from ..helpers.cli_config import CLIConfig
Expand Down Expand Up @@ -87,7 +86,7 @@ def update(self, output_dir, input_file):
CommandStep(
cmd=cmd,
env={"PIPENV_VERBOSITY": "-1"},
message=f"Updating message catalog...",
message="Updating message catalog...",
)
]

Expand Down Expand Up @@ -115,7 +114,7 @@ def compile(
CommandStep(
cmd=cmd,
env={"PIPENV_VERBOSITY": "-1"},
message=f"Compiling message catalog...",
message="Compiling message catalog...",
skippable=True,
),
]
Expand Down
7 changes: 7 additions & 0 deletions invenio_cli/helpers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@
from .docker_helper import DockerHelper
from .env import env
from .filesystem import get_created_files

__all__ = (
"CookiecutterWrapper",
"DockerHelper",
"env",
"get_created_files",
)
1 change: 0 additions & 1 deletion tests/helpers/test_cli_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import os
import tempfile
from pathlib import Path
from unittest.mock import patch

import pytest

Expand Down

0 comments on commit 323ab85

Please sign in to comment.