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

[6.15.z] [pre-commit.ci] pre-commit autoupdate #17376

Merged
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 @@ -12,7 +12,7 @@ repos:
- id: check-yaml
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -28,6 +28,6 @@ repos:
types: [text]
require_serial: true
- repo: https://github.com/gitleaks/gitleaks
rev: v8.22.1
rev: v8.23.1
hooks:
- id: gitleaks
3 changes: 1 addition & 2 deletions conf/dynaconf_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ def post(settings):
except FileNotFoundError:
# no settings cache file exists
logger.warning(
f'The [{settings_cache_path}] cache file was not found.'
'Config will be fetched now.'
f'The [{settings_cache_path}] cache file was not found.Config will be fetched now.'
)
data = get_repos_config(settings)
write_cache(settings_cache_path, data)
Expand Down
12 changes: 6 additions & 6 deletions pytest_fixtures/core/contenthosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,12 @@ def module_container_contenthost(request, module_target_sat):
# needed for docker commands to accept Satellite's cert
host.install_katello_ca(module_target_sat)
for client in constants.CONTAINER_CLIENTS:
assert (
host.execute(f'yum -y install {client}').status == 0
), f'{client} installation failed'
assert (
host.execute('systemctl enable --now podman').status == 0
), 'Start of podman service failed'
assert host.execute(f'yum -y install {client}').status == 0, (
f'{client} installation failed'
)
assert host.execute('systemctl enable --now podman').status == 0, (
'Start of podman service failed'
)
yield host


Expand Down
3 changes: 1 addition & 2 deletions pytest_fixtures/core/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ def pytest_report_header(config):
scope = ''
storage = settings.shared_function.storage
messages.append(
f'shared_function enabled - {shared_function_enabled} - '
f'scope: {scope} - storage: {storage}'
f'shared_function enabled - {shared_function_enabled} - scope: {scope} - storage: {storage}'
)
return messages

Expand Down
4 changes: 1 addition & 3 deletions pytest_fixtures/core/xdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ def align_to_satellite(request, worker_id, satellite_factory):
configure_nailgun()
yield
if on_demand_sat and settings.server.auto_checkin:
logger.info(
f'{worker_id=}: Checking in on-demand Satellite ' f'{on_demand_sat.hostname}'
)
logger.info(f'{worker_id=}: Checking in on-demand Satellite {on_demand_sat.hostname}')
on_demand_sat.teardown()
Broker(hosts=[on_demand_sat]).checkin()
9 changes: 4 additions & 5 deletions robottelo/constants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,7 @@
'rhscl7': {
'id': 'rhel-server-rhscl-7-rpms',
'name': (
'Red Hat Software Collections RPMs for Red Hat Enterprise'
' Linux 7 Server x86_64 7Server'
'Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server x86_64 7Server'
),
'releasever': '7Server',
'version': '7',
Expand Down Expand Up @@ -1383,7 +1382,8 @@
'create_hosts',
'edit_hosts',
'destroy_hosts',
'build_hosts' 'power_hosts',
'build_hosts',
'power_hosts',
'console_hosts',
'ipmi_boot_hosts',
'forget_status_hosts',
Expand Down Expand Up @@ -1745,8 +1745,7 @@
FOREMAN_TEMPLATE_IMPORT_API_URL = 'http://api.github.com/repos/SatelliteQE/foreman_templates'

FOREMAN_TEMPLATE_TEST_TEMPLATE = (
'https://raw.githubusercontent.com/SatelliteQE/foreman_templates/example/'
'example_template.erb'
'https://raw.githubusercontent.com/SatelliteQE/foreman_templates/example/example_template.erb'
)

FOREMAN_TEMPLATE_ROOT_DIR = '/usr/share/foreman_templates'
Expand Down
2 changes: 1 addition & 1 deletion robottelo/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ def create_custom_repos(self, **kwargs):

"""
for name, url in kwargs.items():
content = f'[{name}]\n' f'name={name}\n' f'baseurl={url}\n' 'enabled=1\n' 'gpgcheck=0'
content = f'[{name}]\nname={name}\nbaseurl={url}\nenabled=1\ngpgcheck=0'
self.execute(f'echo "{content}" > /etc/yum.repos.d/{name}.repo')

def get_base_url_for_older_rhel_minor(self):
Expand Down
18 changes: 9 additions & 9 deletions tests/foreman/api/test_capsulecontent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1615,9 +1615,9 @@ def test_positive_content_counts_for_mixed_cv(
# Every "environment repo" (the one promoted to an LCE and synced to the Capsule)
# is shown in the content_counts, so we get N-times more for every shared lce.
shared_lces = {env.id for env in cvv.environment} & {env['id'] for env in capsule_lces}
assert len(caps_counts['repositories']) == len(cvv.repository) * len(
shared_lces
), 'Repositories count does not match.'
assert len(caps_counts['repositories']) == len(cvv.repository) * len(shared_lces), (
'Repositories count does not match.'
)

# Read the environment repos from Satellite side and compare the counts with Capsule.
sat_repos = [
Expand Down Expand Up @@ -1670,9 +1670,9 @@ def test_positive_content_counts_blank_update(
assert 'success' in task['result']

counts = module_capsule_configured.nailgun_capsule.content_counts()
assert (
counts is None or len(counts['content_view_versions']) == 0
), f"No content counts expected, but got:\n{counts['content_view_versions']}."
assert counts is None or len(counts['content_view_versions']) == 0, (
f"No content counts expected, but got:\n{counts['content_view_versions']}."
)

@pytest.mark.parametrize('module_autosync_setting', [True], indirect=True)
@pytest.mark.parametrize(
Expand Down Expand Up @@ -1875,9 +1875,9 @@ def test_positive_reclaim_space(
# Trigger the reclaim space task via API, check it succeeds
task = module_capsule_configured.nailgun_capsule.content_reclaim_space()
assert task, 'No task was created for reclaim space.'
assert (
'Actions::Pulp3::CapsuleContent::ReclaimSpace' in task['label']
), 'Unexpected task triggered'
assert 'Actions::Pulp3::CapsuleContent::ReclaimSpace' in task['label'], (
'Unexpected task triggered'
)
assert 'success' in task['result'], 'Reclaim task did not succeed'

# Check the apidoc references the correct endpoint
Expand Down
3 changes: 1 addition & 2 deletions tests/foreman/api/test_discoveredhost.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ def _assert_discovered_host(host, channel=None, user_config=None):
try:
facts_fdi = _wait_for_log(
channel,
f'\\[I\\|app\\|[a-z0-9]+\\] Started POST '
f'"/api/v2/discovered_hosts/facts" for {fdi_ip}',
f'\\[I\\|app\\|[a-z0-9]+\\] Started POST "/api/v2/discovered_hosts/facts" for {fdi_ip}',
timeout=60,
)
except TimedOutError as err:
Expand Down
Loading
Loading