home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 2140173727

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
2140173727 I_kwDOAMm_X85_kHWf 8760 Use `ruff` for formatting 45271239 open 0     0 2024-02-17T15:07:17Z 2024-02-26T05:58:53Z   CONTRIBUTOR      

What is your issue?

Use ruff for formatting

Context

Ruff was introduced in https://github.com/pydata/xarray/issues/7458. Arguments in favor were that it is faster, and combines multiple tools in a single tool (eg flake8, pyflakes, isort, pyupgrade ).

This switches our primary linter to Ruff. As adervertised, Ruff is very fast. Plust we get the benefit of using a single tool that combines the previous functionality of pyflakes, isort, and pyupgrade.

Suggestion

Suggestion: To move on with ruff replacement of tools, introduce ruff-format to replace black (See ruff Usage for integration with pre-commit). See issue

Pandas uses ruff and ruff-format: https://github.com/pandas-dev/pandas/blob/63dc0f76faa208450b8aaa57246029fcf94d015b/.pre-commit-config.yaml#L24

Ruff is capable of dosctring formatting: https://docs.astral.sh/ruff/formatter/#docstring-formatting

Ruff can format Jupyter Notebooks: https://docs.astral.sh/ruff/faq/#does-ruff-support-jupyter-notebooks

So, introducing the ruff formatter might remove the need for black and blackdoc

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8760/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 issue

Links from other tables

  • 2 rows from issues_id in issues_labels
  • 0 rows from issue in issue_comments
Powered by Datasette · Queries took 0.562ms · About: xarray-datasette