frappe / press

Full service cloud hosting for the Frappe stack - powers Frappe Cloud
https://frappe.cloud
GNU Affero General Public License v3.0
278 stars 195 forks source link

chore: use ruff for linting and formatting (pt.2) #2176

Closed 18alantom closed 1 month ago

18alantom commented 1 month ago

First attempt at #2169. CI only runs linter and formatter on changed files. Ruff does not run only on changed files so anyone who touches a file will have to fix all the issues in it.

Added a (loose-ish) requirement for from __future__ import annotations. Press doesn't strictly need this like agent does.

But it will prevent errors where in an import is type guarded with if TYPE_CHECKING and is used later in annotations without double quotes. This feels like an inevitable bug.

18alantom commented 1 month ago

Failing test is unrelated to this PR, seems to have started after https://github.com/frappe/press/commit/23f051400088729f0ff2d72a13fa6694fa803115 @balamurali27