Skip to content

Commit

Permalink
autoflake test for unused imports and variables
Browse files Browse the repository at this point in the history
  • Loading branch information
larsmoan committed Apr 12, 2024
1 parent b5238d9 commit a748e04
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 23 deletions.
16 changes: 1 addition & 15 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ psycopg2 = "^2.9.3"
gunicorn = "*"
autoflake = "^2.3.1"
black = "^24.3.0"
isort = "^5.13.2"



Expand Down
4 changes: 2 additions & 2 deletions spamoverflow/models/spamoverflow.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import datetime

import shortuuid
from sqlalchemy import Enum, ForeignKey, String
from sqlalchemy.dialects.postgresql import ENUM, UUID
from sqlalchemy import ForeignKey, String
from sqlalchemy.dialects.postgresql import ENUM
from sqlalchemy.orm import relationship

from . import db
Expand Down
7 changes: 4 additions & 3 deletions spamoverflow/utils/utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import re
import uuid
from datetime import datetime
import jsonschema_specifications

import datemath

import jsonschema
from flask import request
from jsonschema import validate
from rfc3339_validator import validate_rfc3339

Expand Down Expand Up @@ -61,7 +62,7 @@ def validate_request(customer_id, request):

# Validate customer_id as UUID
try:
uuid_obj = uuid.UUID(customer_id)
uuid.UUID(customer_id)
except ValueError:
raise ValueError(f"Invalid customer id: {customer_id}")

Expand Down
7 changes: 5 additions & 2 deletions spamoverflow/views/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
from spamoverflow import cache
from spamoverflow.models import db
from spamoverflow.models.spamoverflow import Customer, Domain, Email
from spamoverflow.utils.utils import (find_domains, validate_content_json,
validate_request)
from spamoverflow.utils.utils import (
find_domains,
validate_content_json,
validate_request,
)

api = Blueprint("api", __name__)

Expand Down

0 comments on commit a748e04

Please sign in to comment.