Skip to content

Drop Black as formater from the lint environment in ddev #20451

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

Merged
merged 1 commit into from
Jul 1, 2025

Conversation

AAraKKe
Copy link
Contributor

@AAraKKe AAraKKe commented Jun 5, 2025

What does this PR do?

This PR removes the black dependency in the environment collector to allow

Motivation

For some reason we are not using ruff to format and just to lint our code. However, when running in an IDE developers might be using ruff to format on save which is efficient and can be configure in the same way as black. However, quotes follow by default PEP guidelines using double quotes which means that by formatting with ruff from the IDE (like VSCode) string quotes can be modified by mistake.

The current black configuration includes ignoring string quotes but the ruff configuration does not. This PR updates it.

The pydantic version change is done to be in line with the base package.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Copy link
Contributor Author

AAraKKe commented Jun 5, 2025

Copy link

codecov bot commented Jun 5, 2025

Codecov Report

Attention: Patch coverage is 82.71028% with 37 lines in your changes missing coverage. Please review.

Project coverage is 89.99%. Comparing base (fdd6f6b) to head (8f65df9).
Report is 1 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
active_directory 93.18% <ø> (ø)
activemq 52.80% <ø> (ø)
activemq_xml 82.20% <ø> (ø)
amazon_msk 89.50% <ø> (ø)
ambari 85.75% <ø> (ø)
appgate_sdp 93.93% <ø> (ø)
argo_rollouts 90.00% <ø> (ø)
argocd 87.16% <ø> (ø)
avi_vantage 93.83% <ø> (ø)
boundary 100.00% <ø> (ø)
cassandra 66.66% <ø> (ø)
celery 95.45% <ø> (ø)
cilium 77.92% <ø> (ø)
clickhouse 94.55% <ø> (ø)
confluent_platform 81.96% <ø> (ø)
couch 94.76% <ø> (ø)
crio 89.79% <ø> (ø)
datadog_cluster_agent 90.19% <ø> (ø)
dcgm 93.54% <ø> (ø)
ddev 87.27% <82.71%> (-0.11%) ⬇️
druid 97.70% <ø> (ø)
eks_fargate 94.05% <ø> (ø)
exchange_server 93.06% <ø> (ø)
external_dns 89.28% <ø> (ø)
fluentd 84.21% <ø> (ø)
fluxcd 88.31% <ø> (ø)
gitlab 92.27% <ø> (ø)
gitlab_runner 92.76% <ø> (ø)
go_expvar 92.66% <ø> (ø)
harbor 89.65% <ø> (ø)
hazelcast 92.30% <ø> (ø)
hdfs_datanode 89.63% <ø> (ø)
hdfs_namenode 86.60% <ø> (ø)
hive 51.42% <ø> (ø)
hivemq 61.90% <ø> (ø)
hudi 73.91% <ø> (ø)
ibm_ace 92.25% <ø> (ø)
ignite 46.66% <ø> (ø)
jboss_wildfly 47.36% <ø> (ø)
kafka 64.70% <ø> (ø)
kubevirt_api 82.75% <ø> (ø)
kubevirt_controller 85.36% <ø> (ø)
kubevirt_handler 91.32% <ø> (ø)
kuma 79.03% <ø> (ø)
kyverno 82.27% <ø> (ø)
lighttpd 83.64% <ø> (ø)
linkerd 84.70% <ø> (ø)
mac_audit_logs 80.79% <ø> (ø)
milvus 92.30% <ø> (ø)
nginx_ingress_controller 98.55% <ø> (ø)
openldap 96.33% <ø> (ø)
openmetrics 98.05% <ø> (ø)
pdh_check 95.65% <ø> (ø)
php_fpm 90.45% <ø> (ø)
postfix 88.04% <ø> (ø)
powerdns_recursor 96.65% <ø> (ø)
presto ?
prometheus 94.17% <ø> (ø)
pulsar 100.00% <ø> (ø)
quarkus 100.00% <ø> (ø)
riak 99.21% <ø> (ø)
silverstripe_cms 76.00% <ø> (ø)
solr 56.25% <ø> (ø)
sonarqube 98.10% <ø> (ø)
sonatype_nexus 76.69% <ø> (ø)
ssh_check 91.32% <ø> (ø)
statsd 87.36% <ø> (ø)
strimzi 83.00% <ø> (ø)
supervisord 90.14% <ø> (ø)
system_swap 98.30% <ø> (ø)
tekton 82.45% <ø> (ø)
teleport 98.16% <ø> (ø)
teradata 94.27% <ø> (ø)
tomcat 60.41% <ø> (ø)
twemproxy 79.45% <ø> (ø)
voltdb 96.84% <ø> (ø)
weaviate 76.27% <ø> (ø)
weblogic ?
windows_performance_counters 98.36% <ø> (ø)
windows_service 94.53% <ø> (ø)
wmi_check 92.91% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AAraKKe AAraKKe added qa/skip-qa Automatically skip this PR for the next QA changelog/no-changelog labels Jun 5, 2025 — with Graphite App
@AAraKKe AAraKKe force-pushed the aarake/small-tweaks-for-devx branch 2 times, most recently from 76c1c45 to 2e6e400 Compare June 5, 2025 11:01
Copy link

github-actions bot commented Jun 5, 2025

The changelog type changed or removed was used in this Pull Request, so the next release will bump major version. Please make sure this is a breaking change, or use the fixed or added type instead.

@AAraKKe AAraKKe force-pushed the aarake/small-tweaks-for-devx branch from 2e6e400 to 1085961 Compare June 5, 2025 11:05
Copy link

github-actions bot commented Jun 5, 2025

The changelog type changed or removed was used in this Pull Request, so the next release will bump major version. Please make sure this is a breaking change, or use the fixed or added type instead.

Copy link

github-actions bot commented Jun 5, 2025

The changelog type changed or removed was used in this Pull Request, so the next release will bump major version. Please make sure this is a breaking change, or use the fixed or added type instead.

Copy link

github-actions bot commented Jun 5, 2025

The changelog type changed or removed was used in this Pull Request, so the next release will bump major version. Please make sure this is a breaking change, or use the fixed or added type instead.

@AAraKKe AAraKKe force-pushed the aarake/small-tweaks-for-devx branch from c5defd7 to cb7923e Compare June 5, 2025 14:16
Copy link

github-actions bot commented Jun 5, 2025

The changelog type changed or removed was used in this Pull Request, so the next release will bump major version. Please make sure this is a breaking change, or use the fixed or added type instead.

@AAraKKe AAraKKe changed the title Update pydantic default version and ensure quotes are not modified when running ruff Drop Black as formater from the lint environment in ddev Jun 5, 2025
@AAraKKe AAraKKe marked this pull request as ready for review June 5, 2025 14:57
@AAraKKe AAraKKe requested a review from a team as a code owner June 5, 2025 14:57
Copy link

github-actions bot commented Jun 5, 2025

The changelog type changed or removed was used in this Pull Request, so the next release will bump major version. Please make sure this is a breaking change, or use the fixed or added type instead.

@AAraKKe AAraKKe force-pushed the aarake/small-tweaks-for-devx branch from cb7923e to 73c496a Compare June 6, 2025 08:34
Copy link

github-actions bot commented Jun 6, 2025

The changelog type changed or removed was used in this Pull Request, so the next release will bump major version. Please make sure this is a breaking change, or use the fixed or added type instead.

@AAraKKe AAraKKe force-pushed the aarake/small-tweaks-for-devx branch from 73c496a to d9c7f24 Compare June 6, 2025 09:11
Copy link

github-actions bot commented Jun 6, 2025

The changelog type changed or removed was used in this Pull Request, so the next release will bump major version. Please make sure this is a breaking change, or use the fixed or added type instead.

@AAraKKe AAraKKe force-pushed the aarake/small-tweaks-for-devx branch from d9c7f24 to 38b8853 Compare June 6, 2025 09:13
Copy link

github-actions bot commented Jun 6, 2025

The changelog type changed or removed was used in this Pull Request, so the next release will bump major version. Please make sure this is a breaking change, or use the fixed or added type instead.

@AAraKKe AAraKKe force-pushed the aarake/small-tweaks-for-devx branch from 1d2d609 to 62e6704 Compare June 30, 2025 12:55
Copy link
Contributor Author

@AAraKKe AAraKKe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the changes introduced in the last iteration. After discussing offline with @iliakur we decided to intercept the output of the command and print the next steps instead of keeping the echos in the command to be run in the hatch environments.

This is how an unsafe fix would look like if found

image

The last line will be printed in warning format.

Copy link
Contributor

@estherk15 estherk15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left optional suggestions!

iliakur
iliakur previously approved these changes Jun 30, 2025
@AAraKKe AAraKKe force-pushed the aarake/small-tweaks-for-devx branch from b5df894 to 32320e2 Compare June 30, 2025 14:10
@temporal-github-worker-1 temporal-github-worker-1 bot dismissed iliakur’s stale review June 30, 2025 14:10

Review from iliakur is dismissed. Related teams and files:

  • agent-integrations
    • ddev/changelog.d/20451.added
    • ddev/changelog.d/20451.changed
    • ddev/pyproject.toml
    • ddev/release/macos/build_pkg.py
    • ddev/src/ddev/cli/dep/updates.py
    • ddev/src/ddev/cli/meta/scripts/generate_metrics.py
    • ddev/src/ddev/cli/size/historical_metrics.py
    • ddev/src/ddev/cli/size/timeline.py
    • ddev/src/ddev/cli/size/utils/common_funcs.py
    • ddev/src/ddev/cli/test/init.py
    • ddev/src/ddev/e2e/agent/docker.py
    • ddev/src/ddev/plugin/external/hatch/environment_collector.py
    • ddev/src/ddev/utils/platform.py
    • ddev/tests/cli/release/test_changelog.py
    • ddev/tests/cli/test/test_test.py
    • ddev/tests/repo/test_core.py
    • ddev/tests/utils/test_structures.py
    • pyproject.toml
@AAraKKe AAraKKe force-pushed the aarake/small-tweaks-for-devx branch from 32320e2 to 4c70675 Compare June 30, 2025 14:14
iliakur
iliakur previously approved these changes Jun 30, 2025
@AAraKKe AAraKKe force-pushed the aarake/small-tweaks-for-devx branch from 4c70675 to a6f9a43 Compare June 30, 2025 17:19
@temporal-github-worker-1 temporal-github-worker-1 bot dismissed iliakur’s stale review June 30, 2025 17:19

Review from iliakur is dismissed. Related teams and files:

  • agent-integrations
    • ddev/changelog.d/20451.added
    • ddev/changelog.d/20451.changed
    • ddev/pyproject.toml
    • ddev/release/macos/build_pkg.py
    • ddev/src/ddev/cli/dep/updates.py
    • ddev/src/ddev/cli/meta/scripts/generate_metrics.py
    • ddev/src/ddev/cli/size/historical_metrics.py
    • ddev/src/ddev/cli/size/timeline.py
    • ddev/src/ddev/cli/size/utils/common_funcs.py
    • ddev/src/ddev/cli/test/init.py
    • ddev/src/ddev/e2e/agent/docker.py
    • ddev/src/ddev/plugin/external/hatch/environment_collector.py
    • ddev/src/ddev/utils/platform.py
    • ddev/tests/cli/env/test_test.py
    • ddev/tests/cli/release/test_changelog.py
    • ddev/tests/cli/size/test_diff.py
    • ddev/tests/cli/size/test_status.py
    • ddev/tests/cli/size/test_timeline.py
    • ddev/tests/cli/test/test_test.py
    • ddev/tests/conftest.py
    • ddev/tests/repo/test_core.py
    • ddev/tests/utils/test_structures.py
    • pyproject.toml
@AAraKKe AAraKKe force-pushed the aarake/small-tweaks-for-devx branch 4 times, most recently from 909e654 to c6fb13a Compare July 1, 2025 09:16
@AAraKKe AAraKKe force-pushed the aarake/small-tweaks-for-devx branch from c6fb13a to 8f65df9 Compare July 1, 2025 09:18
@AAraKKe
Copy link
Contributor Author

AAraKKe commented Jul 1, 2025

Merging the PR now, will follow up with the one on top of the stack afterwards.

@AAraKKe AAraKKe merged commit 10fd17c into master Jul 1, 2025
187 of 322 checks passed
@AAraKKe AAraKKe deleted the aarake/small-tweaks-for-devx branch July 1, 2025 10:52
github-actions bot pushed a commit that referenced this pull request Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants