Skip to content

Commit dd35692

Browse files
committed
add ruff lint check to ci
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
1 parent 4dab936 commit dd35692

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ jobs:
101101
- name: Run linting tools
102102
run: pylint --exit-zero src/pkgdev
103103

104+
- uses: astral-sh/ruff-action@v3
105+
with:
106+
args: "check --diff"
107+
104108
format:
105109
runs-on: ubuntu-latest
106110
if: inputs.disable-format-check == ''

‎doc/conf.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python3
2-
# -*- coding: utf-8 -*-
32
#
43
# pkgdev documentation build configuration file, created by
54
# sphinx-quickstart on Thu Apr 9 00:50:08 2015.
@@ -329,5 +328,5 @@
329328
"python": ("https://docs.python.org/3", None),
330329
}
331330
intersphinx_mapping.update(
332-
(x, (f"https://pkgcore.github.io/{x}", None)) for x in "pkgcheck pkgcore snakeoil".split()
331+
(x, (f"https://pkgcore.github.io/{x}", None)) for x in ("pkgcheck", "pkgcore", "snakeoil")
333332
)

‎pyproject.toml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ exclude = [
7070
[tool.ruff]
7171
line-length = 100
7272
target-version = "py311"
73+
exclude = [
74+
"src/pkgdev/_vendor/tabulate.py"
75+
]
7376

7477
[tool.ruff.lint.per-file-ignores]
7578
"tests/**" = [

‎src/pkgdev/cli.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def parse_known_args(self, args=None, namespace=None):
148148
)
149149
if repo is not None:
150150
namespace = config_parser.parse_config_sections(namespace, repo.aliases)
151-
except (repo_errors.InitializationError, IOError) as exc:
151+
except (OSError, repo_errors.InitializationError) as exc:
152152
self.error(str(exc))
153153

154154
if os.getenv("NOCOLOR"):

0 commit comments

Comments
 (0)