Skip to content

Commit

Permalink
refact: cleanup imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
sfermigier committed Mar 23, 2024
1 parent 7d4f1b0 commit d9c0d33
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
## [1.1.1] - UNRELEASED

- Cleanup "sysinfo" code.
- Cleanup imports


## [1.1.0] - 2024-03-23
Expand Down
3 changes: 0 additions & 3 deletions src/abilian/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
import importlib

# Temps monkey patches
import json
import os
import sys
import urllib.parse
import warnings
from collections.abc import Callable, Collection
from functools import cached_property, partial
Expand All @@ -19,7 +17,6 @@
from typing import Any

import defusedxml
import flask.json
import jinja2
import sqlalchemy as sa
import sqlalchemy.exc
Expand Down
2 changes: 1 addition & 1 deletion src/abilian/core/models/subjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import random
import string
from abc import ABC, ABCMeta, abstractmethod
from abc import ABC, abstractmethod
from datetime import datetime, timedelta

import bcrypt
Expand Down
4 changes: 0 additions & 4 deletions src/abilian/core/sqlalchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@

import contextlib
import json
import sys
import uuid
from sqlite3 import Connection
from typing import Any

import babel
import babel.dates
import flask_sqlalchemy as flask_sa
import pytz
import sqlalchemy as sa
import sqlalchemy.dialects
Expand All @@ -26,8 +24,6 @@
from sqlalchemy.ext.mutable import Mutable
from sqlalchemy.sql.sqltypes import CHAR

from .logger_patch import patch_logger


@listens_for(sa.pool.Pool, "checkout")
def ping_connection(dbapi_connection: Connection, connection_record, connection_proxy):
Expand Down
3 changes: 1 addition & 2 deletions src/abilian/sbe/apps/communities/views/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from typing import Any

import openpyxl
import pytz
import sqlalchemy as sa
import sqlalchemy.sql.functions
from flask import (
Expand All @@ -37,7 +36,7 @@
from abilian.core.extensions import db
from abilian.core.models.subjects import Group, User, UserQuery
from abilian.core.signals import activity
from abilian.core.util import unwrap, utc_dt
from abilian.core.util import unwrap
from abilian.i18n import _, _l
from abilian.sbe.apps.communities.actions import register_actions
from abilian.sbe.apps.communities.blueprint import CommunityBlueprint
Expand Down
1 change: 0 additions & 1 deletion src/abilian/sbe/apps/documents/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import uuid
from collections.abc import Collection, Iterator
from importlib import resources as rso
from pathlib import Path
from typing import TYPE_CHECKING, Any

import sqlalchemy as sa
Expand Down
1 change: 0 additions & 1 deletion src/abilian/services/audit/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from typing import Any

from flask import current_app
from flask_sqlalchemy import BaseQuery
from loguru import logger
from sqlalchemy import LargeBinary
from sqlalchemy.orm import relationship
Expand Down
2 changes: 1 addition & 1 deletion src/abilian/services/indexing/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from abc import ABC, ABCMeta, abstractmethod
from abc import ABC, abstractmethod
from operator import attrgetter
from typing import Any

Expand Down
1 change: 0 additions & 1 deletion src/abilian/services/indexing/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from pathlib import Path
from typing import TYPE_CHECKING, Any

import flask
import sqlalchemy as sa
from flask import Flask, appcontext_pushed, current_app, g
from flask_login import current_user
Expand Down
1 change: 0 additions & 1 deletion src/abilian/services/security/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from functools import total_ordering

from flask_babel import LazyString
from flask_sqlalchemy import BaseQuery
from sqlalchemy import sql
from sqlalchemy.orm import backref, relationship
from sqlalchemy.schema import (
Expand Down
2 changes: 1 addition & 1 deletion src/abilian/web/csrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from collections.abc import Callable
from functools import wraps

from flask import Blueprint, config, current_app, request
from flask import Blueprint, current_app, request
from flask_wtf import FlaskForm
from werkzeug.exceptions import Forbidden
from wtforms.csrf.core import CSRFTokenField
Expand Down

0 comments on commit d9c0d33

Please sign in to comment.