Skip to content

Commit c72ef2f

Browse files
committed
Update CI files
1 parent 55eb656 commit c72ef2f

12 files changed

Lines changed: 30 additions & 68 deletions

.ci/scripts/check_gettext.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
# make sure this script runs at the repo root
1111
cd "$(dirname "$(realpath -e "$0")")"/../..
1212

13-
set -uv
13+
set -u
1414

15-
MATCHES=$(grep -n -r --include \*.py "_(f")
15+
MATCHES="$(grep -n -r --include \*.py "_(f" pulp_gem )"
1616

1717
if [ $? -ne 1 ]; then
1818
printf "\nERROR: Detected mix of f-strings and gettext:\n"

.ci/scripts/check_pulpcore_imports.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
# make sure this script runs at the repo root
1111
cd "$(dirname "$(realpath -e "$0")")"/../..
1212

13-
set -uv
13+
set -u
1414

1515
# check for imports not from pulpcore.plugin. exclude tests
16-
MATCHES=$(grep -n -r --include \*.py "from pulpcore.*import" . | grep -v "tests\|plugin")
16+
MATCHES="$(grep -n -r --include \*.py "from pulpcore.*import" pulp_gem | grep -v "tests\|plugin")"
1717

1818
if [ $? -ne 1 ]; then
1919
printf "\nERROR: Detected bad imports from pulpcore:\n"

.ci/scripts/check_release.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ def main(options: argparse.Namespace, template_config: dict[str, t.Any]) -> int:
157157

158158
if reasons:
159159
curr_version = Version(last_tag)
160-
assert curr_version.base_version.startswith(
161-
branch
162-
), "Current-version has to belong to the current branch!"
160+
assert curr_version.base_version.startswith(branch), (
161+
"Current-version has to belong to the current branch!"
162+
)
163163
next_version = Version(f"{branch}.{curr_version.micro + 1}")
164164
print(
165165
f"A Z-release is needed for {branch}, "

.ci/scripts/check_requirements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
import warnings
1010
from packaging.requirements import Requirement
1111

12+
1213
CHECK_MATRIX = [
1314
("pyproject.toml", True, True, True),
1415
("requirements.txt", True, True, True),
15-
("dev_requirements.txt", False, True, False),
1616
("ci_requirements.txt", False, True, True),
1717
("doc_requirements.txt", False, True, False),
1818
("lint_requirements.txt", False, True, True),

.ci/scripts/collect_changes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from git import GitCommandError, Repo
2626
from packaging.version import parse as parse_version
2727

28+
2829
PYPI_PROJECT = "pulp_gem"
2930

3031
# Read Towncrier settings

.flake8

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,13 @@ jobs:
3636
run: |
3737
yamllint -s -d '{extends: relaxed, rules: {line-length: disable}}' .github/workflows
3838
39-
# run black separately from flake8 to get a diff
40-
- name: "Run black"
39+
- name: "Check formating"
4140
run: |
42-
black --version
43-
black --check --diff .
41+
ruff format --check --diff
4442
45-
# Lint code.
46-
- name: "Run flake8"
43+
- name: "Lint code"
4744
run: |
48-
flake8
45+
ruff check --diff
4946
5047
- name: "Check for common gettext problems"
5148
run: |

.github/workflows/scripts/stage-changelog-for-default-branch.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@
1212
from git import Repo
1313
from git.exc import GitCommandError
1414

15-
helper = textwrap.dedent("""\
15+
16+
helper = textwrap.dedent(
17+
"""\
1618
Stage the changelog for a release on main branch.
1719
1820
Example:
1921
$ python .github/workflows/scripts/stage-changelog-for-default-branch.py 3.4.0
2022
21-
""")
23+
"""
24+
)
2225

2326
parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, description=helper)
2427

dev_requirements.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

lint_requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
#
66
# For more info visit https://github.com/pulp/plugin_template
77

8-
black~=26.3 # Pin style to the year. https://black.readthedocs.io/en/stable/faq.html#how-stable-is-black-s-style
98
bump-my-version
109
check-manifest
11-
flake8
12-
flake8-black
1310
packaging
11+
ruff
1412
yamllint

0 commit comments

Comments
 (0)