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

Redirect from rule codes to rule pages in docs #8636

Merged
merged 1 commit into from
Nov 12, 2023
Merged

Conversation

charliermarsh
Copy link
Member

Summary

This adds redirects from, e.g., https://docs.astral.sh/ruff/rules/F401 to https://docs.astral.sh/ruff/rules/unused-import, which are generated automatically when creating the documentation. Though we want to move towards human-readable names eventually, I think this is a nice and user-friendly change (and doesn't require any fancy infrastructure, since the redirects are handled via a plugin and added client-side).

Closes #4710.

@charliermarsh charliermarsh added the documentation Improvements or additions to documentation label Nov 12, 2023
Copy link
Contributor

github-actions bot commented Nov 12, 2023

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+20763 -20763 violations, +0 -0 fixes in 41 projects)

aiven/aiven-client (+17 -17 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview

- aiven/client/argx.py:103:26: PLR6301 Method `_get_help_string` could be a function, class method, or static method
+ aiven/client/argx.py:103:9: PLR6301 Method `_get_help_string` could be a function, class method, or static method
- aiven/client/argx.py:298:25: PLR6301 Method `expected_errors` could be a function, class method, or static method
+ aiven/client/argx.py:298:9: PLR6301 Method `expected_errors` could be a function, class method, or static method
+ aiven/client/argx.py:301:9: PLR6301 Method `_to_mapping_collection` could be a function, class method, or static method
- aiven/client/argx.py:302:9: PLR6301 Method `_to_mapping_collection` could be a function, class method, or static method
- aiven/client/cli.py:1012:39: PLR6301 Method `_format_service_notifications` could be a function, class method, or static method
+ aiven/client/cli.py:1012:9: PLR6301 Method `_format_service_notifications` could be a function, class method, or static method
- aiven/client/cli.py:1028:37: PLR6301 Method `print_service_notifications` could be a function, class method, or static method
+ aiven/client/cli.py:1028:9: PLR6301 Method `print_service_notifications` could be a function, class method, or static method
... 24 additional changes omitted for project

apache/airflow (+6415 -6415 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --select ALL --preview

+ airflow/api/client/local_client.py:31:9: PLR6301 Method `trigger_dag` could be a function, class method, or static method
- airflow/api/client/local_client.py:32:9: PLR6301 Method `trigger_dag` could be a function, class method, or static method
- airflow/api/client/local_client.py:58:20: PLR6301 Method `delete_dag` could be a function, class method, or static method
+ airflow/api/client/local_client.py:58:9: PLR6301 Method `delete_dag` could be a function, class method, or static method
- airflow/api/client/local_client.py:62:18: PLR6301 Method `get_pool` could be a function, class method, or static method
+ airflow/api/client/local_client.py:62:9: PLR6301 Method `get_pool` could be a function, class method, or static method
- airflow/api/client/local_client.py:68:19: PLR6301 Method `get_pools` could be a function, class method, or static method
+ airflow/api/client/local_client.py:68:9: PLR6301 Method `get_pools` could be a function, class method, or static method
- airflow/api/client/local_client.py:71:21: PLR6301 Method `create_pool` could be a function, class method, or static method
+ airflow/api/client/local_client.py:71:9: PLR6301 Method `create_pool` could be a function, class method, or static method
- airflow/api/client/local_client.py:86:21: PLR6301 Method `delete_pool` could be a function, class method, or static method
+ airflow/api/client/local_client.py:86:9: PLR6301 Method `delete_pool` could be a function, class method, or static method
- airflow/api/client/local_client.py:90:21: PLR6301 Method `get_lineage` could be a function, class method, or static method
+ airflow/api/client/local_client.py:90:9: PLR6301 Method `get_lineage` could be a function, class method, or static method
- airflow/api_connexion/schemas/common_schema.py:118:22: PLR6301 Method `get_obj_type` could be a function, class method, or static method
... 12815 additional changes omitted for project

aws/aws-sam-cli (+342 -342 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview

- samcli/cli/command.py:133:25: PLR6301 Method `format_commands` could be a function, class method, or static method
+ samcli/cli/command.py:133:9: PLR6301 Method `format_commands` could be a function, class method, or static method
- samcli/commands/list/json_consumer.py:14:17: PLR6301 Method `consume` could be a function, class method, or static method
+ samcli/commands/list/json_consumer.py:14:9: PLR6301 Method `consume` could be a function, class method, or static method
- samcli/commands/list/table_consumer.py:15:17: PLR6301 Method `consume` could be a function, class method, or static method
+ samcli/commands/list/table_consumer.py:15:9: PLR6301 Method `consume` could be a function, class method, or static method
- samcli/commands/traces/trace_console_consumers.py:17:17: PLR6301 Method `consume` could be a function, class method, or static method
+ samcli/commands/traces/trace_console_consumers.py:17:9: PLR6301 Method `consume` could be a function, class method, or static method
- samcli/lib/cookiecutter/question.py:133:16: PLR6301 Method `prompt` could be a function, class method, or static method
+ samcli/lib/cookiecutter/question.py:133:9: PLR6301 Method `prompt` could be a function, class method, or static method
... 674 additional changes omitted for project

bokeh/bokeh (+1872 -1872 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --select ALL --preview

- examples/server/app/server_auth/auth.py:34:26: PLR6301 Method `check_permission` could be a function, class method, or static method
+ examples/server/app/server_auth/auth.py:34:9: PLR6301 Method `check_permission` could be a function, class method, or static method
- release/system.py:50:15: PLR6301 Method `abort` could be a function, class method, or static method
+ release/system.py:50:9: PLR6301 Method `abort` could be a function, class method, or static method
- release/system.py:54:12: PLR6301 Method `cd` could be a function, class method, or static method
+ release/system.py:54:9: PLR6301 Method `cd` could be a function, class method, or static method
- src/bokeh/application/handlers/handler.py:198:25: PLR6301 Method `process_request` could be a function, class method, or static method
+ src/bokeh/application/handlers/handler.py:198:9: PLR6301 Method `process_request` could be a function, class method, or static method
- src/bokeh/application/handlers/handler.py:220:18: PLR6301 Method `url_path` could be a function, class method, or static method
+ src/bokeh/application/handlers/handler.py:220:9: PLR6301 Method `url_path` could be a function, class method, or static method
... 3734 additional changes omitted for project

freedomofpress/securedrop (+182 -182 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview

+ admin/securedrop_admin/__init__.py:103:13: PLR6301 Method `validate` could be a function, class method, or static method
- admin/securedrop_admin/__init__.py:103:22: PLR6301 Method `validate` could be a function, class method, or static method
+ admin/securedrop_admin/__init__.py:109:13: PLR6301 Method `validate` could be a function, class method, or static method
- admin/securedrop_admin/__init__.py:109:22: PLR6301 Method `validate` could be a function, class method, or static method
+ admin/securedrop_admin/__init__.py:115:13: PLR6301 Method `validate` could be a function, class method, or static method
- admin/securedrop_admin/__init__.py:115:22: PLR6301 Method `validate` could be a function, class method, or static method
+ admin/securedrop_admin/__init__.py:122:13: PLR6301 Method `validate` could be a function, class method, or static method
- admin/securedrop_admin/__init__.py:122:22: PLR6301 Method `validate` could be a function, class method, or static method
+ admin/securedrop_admin/__init__.py:130:13: PLR6301 Method `validate` could be a function, class method, or static method
- admin/securedrop_admin/__init__.py:130:22: PLR6301 Method `validate` could be a function, class method, or static method
... 354 additional changes omitted for project

fronzbot/blinkpy (+14 -14 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview

- blinkpy/auth.py:92:16: PLR6301 Method `logout` could be a function, class method, or static method
+ blinkpy/auth.py:92:9: PLR6301 Method `logout` could be a function, class method, or static method
+ blinkpy/sync_module.py:537:15: PLR6301 Method `get_network_info` could be a function, class method, or static method
- blinkpy/sync_module.py:537:32: PLR6301 Method `get_network_info` could be a function, class method, or static method
+ blinkpy/sync_module.py:600:15: PLR6301 Method `get_network_info` could be a function, class method, or static method
- blinkpy/sync_module.py:600:32: PLR6301 Method `get_network_info` could be a function, class method, or static method
+ tests/test_auth.py:277:15: PLR6301 Method `get` could be a function, class method, or static method
- tests/test_auth.py:277:19: PLR6301 Method `get` could be a function, class method, or static method
+ tests/test_auth.py:281:15: PLR6301 Method `post` could be a function, class method, or static method
- tests/test_auth.py:281:20: PLR6301 Method `post` could be a function, class method, or static method
... 18 additional changes omitted for project

ibis-project/ibis (+109 -109 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview

- docs/_renderer.py:12:16: PLR6301 Method `render` could be a function, class method, or static method
+ docs/_renderer.py:12:9: PLR6301 Method `render` could be a function, class method, or static method
- ibis/backends/base/__init__.py:137:18: PLR6301 Method `_qualify` could be a function, class method, or static method
+ ibis/backends/base/__init__.py:137:9: PLR6301 Method `_qualify` could be a function, class method, or static method
- ibis/backends/base/__init__.py:140:20: PLR6301 Method `_unqualify` could be a function, class method, or static method
+ ibis/backends/base/__init__.py:140:9: PLR6301 Method `_unqualify` could be a function, class method, or static method
+ ibis/backends/base/__init__.py:590:9: PLR6301 Method `to_delta` could be a function, class method, or static method
- ibis/backends/base/__init__.py:591:9: PLR6301 Method `to_delta` could be a function, class method, or static method
- ibis/backends/base/sql/__init__.py:353:14: PLR6301 Method `_log` could be a function, class method, or static method
+ ibis/backends/base/sql/__init__.py:353:9: PLR6301 Method `_log` could be a function, class method, or static method
... 208 additional changes omitted for project

milvus-io/pymilvus (+21 -21 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview

- examples/multithreading_hello_milvus.py:49:21: PLR6301 Method `insert_data` could be a function, class method, or static method
+ examples/multithreading_hello_milvus.py:49:9: PLR6301 Method `insert_data` could be a function, class method, or static method
- pymilvus/bulk_writer/buffer.py:72:16: PLR6301 Method `_throw` could be a function, class method, or static method
+ pymilvus/bulk_writer/buffer.py:72:9: PLR6301 Method `_throw` could be a function, class method, or static method
- pymilvus/bulk_writer/bulk_writer.py:101:16: PLR6301 Method `_throw` could be a function, class method, or static method
+ pymilvus/bulk_writer/bulk_writer.py:101:9: PLR6301 Method `_throw` could be a function, class method, or static method
- pymilvus/bulk_writer/remote_bulk_writer.py:126:19: PLR6301 Method `_local_rm` could be a function, class method, or static method
+ pymilvus/bulk_writer/remote_bulk_writer.py:126:9: PLR6301 Method `_local_rm` could be a function, class method, or static method
+ pymilvus/client/abstract.py:309:9: PLR6301 Method `get_fields_by_range` could be a function, class method, or static method
- pymilvus/client/abstract.py:310:9: PLR6301 Method `get_fields_by_range` could be a function, class method, or static method
... 32 additional changes omitted for project

... Truncated remaining completed projected reports due to GitHub comment length restrictions

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PLR6301 41526 20763 20763 0 0

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@charliermarsh charliermarsh force-pushed the charlie/redirects branch 2 times, most recently from f1b0246 to ec62045 Compare November 12, 2023 21:49
@charliermarsh charliermarsh merged commit 02946e7 into main Nov 12, 2023
17 checks passed
@charliermarsh charliermarsh deleted the charlie/redirects branch November 12, 2023 22:47
@maltevesper
Copy link
Contributor

maltevesper commented Nov 21, 2023

@charliermarsh : I think you broke something, when building the docs without access to the insiders version of MKdocs, I am told that the typeset plugin is not installed, which is insiders only (https://squidfunk.github.io/mkdocs-material/plugins/typeset/).
Given the description of #5544, I am wondering if I did use mkdocs wrong, or if this is an accidental regression. Given that the PR is not that old I figured I will just leave a note here, instead of creating a new issue.

@charliermarsh
Copy link
Member Author

@maltevesper -- Are you using -f mkdocs.public.yml? I think the documentation just needs to be updated to reflect that.

@charliermarsh
Copy link
Member Author

@maltevesper -- See: #8806

@maltevesper
Copy link
Contributor

@maltevesper -- Are you using -f mkdocs.public.yml? I think the documentation just needs to be updated to reflect that.

I did not, thanks for the update.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: feature-request: add aliases for short codes and add new format mode
2 participants