Replace isort, flake8, pycln and pyupgrade by ruff. [Ruff](https://github.com/charliermarsh/ruff) is getting popular lately, and I really like the idea of having a single tool for Python lining instead of N which currently exist. Also written in Rust which is a good use case for this.

 It's supposed to have equivalent functionality, to the ones we are using. The fact that major projects are adopting it is a good sign (see list in their readme).  There are also a few extra options in their readme that look interesting and that we could enable (without having to install yet another plugin)

We won't gain much speed-wise: previously isort, flake8 (which itself is an abstraction over pycodestyle and pyflakes), pycln and pyupgrade  on all files was around 1s, and now it's 20ms. But with mypy taking 10s, it makes mostly no difference.
Still it makes the overall linting configuration easier to maintain.


If we go forward with this, I imagine a changelog is not needed? 

from collections.abc import Callable
from typing import TypeVar

T = TypeVar("T")


def docs_argspec(argspec: str) -> Callable[[T], T]:
    """Override the argspec of the function in the documentation.

    This is defined as a no-op here, but is overridden when building the docs.

    It is not easy to satisfy mypy so frequently we have to put something like
    *args: Any, **kwargs: Any as the type for the method itself. This makes the
    docs look bad because they ignore the overloads. This allows us to satisfy
    mypy but also render something better in the docs. See implementation in
    docs/conf.py.
    """

    def dec(func):
        return func

    return dec


import builtins

# Evil method to override docs_argspec when building docs
globals()["docs_argspec"] = getattr(builtins, "--docs_argspec--", docs_argspec)

__all__ = ["docs_argspec"]

from collections.abc import Callable
from typing import TypeVar

T = TypeVar("T")


def docs_argspec(argspec: str) -> Callable[[T], T]:
    """Override the argspec of the function in the documentation.

    This is defined as a no-op here, but is overridden when building the docs.

    It is not easy to satisfy mypy so frequently we have to put something like
    *args: Any, **kwargs: Any as the type for the method itself. This makes the
    docs look bad because they ignore the overloads. This allows us to satisfy
    mypy but also render something better in the docs. See implementation in
    docs/conf.py.
    """

    def dec(func):
        return func

    return dec


import builtins

# Evil method to override docs_argspec when building docs
globals()["docs_argspec"] = getattr(builtins, "--docs_argspec--", docs_argspec)

__all__ = ["docs_argspec"]
