Add ruff to the "lint" session

`ruff` runs alongside `flake8` and `isort`,
with the rules aligned to theirs:
- `noqa` comments go where both tools expect them
- `import`s stay sorted case-insensitively,
  now stated explicitly in both tools
- `print()` in the "docs" session became `session.log()`
This commit is contained in:
Alexander Hess 2026-11-28 04:37:02 +01:00
commit 318dff8fc8
Signed by: alexander
GPG key ID: B46EDB4DFC26805D
3 changed files with 166 additions and 12 deletions

View file

@ -33,7 +33,7 @@ class Path(meta.Base):
Implements an association pattern between `Address` and `Address`.
Further info:
https://docs.sqlalchemy.org/en/stable/orm/basic_relationships.html#association-object # noqa:E501
https://docs.sqlalchemy.org/en/stable/orm/basic_relationships.html#association-object
"""
__tablename__ = "addresses_addresses"

View file

@ -13,7 +13,7 @@ class AddressPixelAssociation(meta.Base):
updates the `city_id` and `grid_id` columns.
Further info:
https://docs.sqlalchemy.org/en/stable/orm/basic_relationships.html#association-object # noqa:E501
https://docs.sqlalchemy.org/en/stable/orm/basic_relationships.html#association-object
"""
__tablename__ = "addresses_pixels"

View file

@ -216,14 +216,14 @@ class City(meta.Base):
row[0]
for row in db.session.execute(
sa.text(
f""" -- # noqa:S608
f"""
SELECT DISTINCT
{config.CLEAN_SCHEMA}.addresses.zip_code
FROM
{config.CLEAN_SCHEMA}.addresses AS addresses
WHERE
{config.CLEAN_SCHEMA}.addresses.city_id = {self.id};
""",
""", # noqa:S608
),
)
)