django-stars / backend-skeleton

108 stars 41 forks source link

[DI-2708] Ruff ALL rules #91

Open bulya opened 2 days ago

bulya commented 2 days ago

Ruff ALL rules

[!NOTE]
More info in the internal Slack thread https://djangostars.slack.com/archives/C04E2PGC8AZ/p1728395130523569

The main change is select = ["ALL"] as ruff rules, with some minimal exceptions. Adds a lot of type annotations that would be helpful for further mypy integration.

Also, running make api-check for checking linting and formatting of the generated default project.

alexryabtsev commented 2 days ago

IMHO All these type annotations litter code a lot, especially things like:

What do you think about using an if statement with TYPE_CHECKING?