diff --git a/sqlalchemy_1.6_to_2.0/input_repo/main.py b/sqlalchemy_1.6_to_2.0/input_repo/main.py index f328f1b..1bbbc4b 100644 --- a/sqlalchemy_1.6_to_2.0/input_repo/main.py +++ b/sqlalchemy_1.6_to_2.0/input_repo/main.py @@ -1,7 +1,8 @@ # main.py from fastapi import FastAPI, Depends, HTTPException from sqlalchemy.orm import Session -import models, schemas +import models +import schemas from database import SessionLocal, engine from typing import List diff --git a/sqlalchemy_1.6_to_2.0/input_repo/models.py b/sqlalchemy_1.6_to_2.0/input_repo/models.py index cd1a9a8..07ba9ca 100644 --- a/sqlalchemy_1.6_to_2.0/input_repo/models.py +++ b/sqlalchemy_1.6_to_2.0/input_repo/models.py @@ -1,5 +1,5 @@ -from sqlalchemy import Column, Integer, String, ForeignKey, Index -from sqlalchemy.orm import relationship, backref +from sqlalchemy import Column, Integer, String, ForeignKey +from sqlalchemy.orm import relationship from database import Base class Publisher(Base): diff --git a/sqlalchemy_1.6_to_2.0/output_repo/database.py b/sqlalchemy_1.6_to_2.0/output_repo/database.py index c606b3b..26ccd07 100644 --- a/sqlalchemy_1.6_to_2.0/output_repo/database.py +++ b/sqlalchemy_1.6_to_2.0/output_repo/database.py @@ -1,6 +1,5 @@ # database.py from sqlalchemy import create_engine -from sqlalchemy.orm import DeclarativeBase from sqlalchemy.orm import sessionmaker SQLALCHEMY_DATABASE_URL = "postgresql://user:password@localhost/dbname" # Change to your database URL diff --git a/sqlalchemy_1.6_to_2.0/output_repo/main.py b/sqlalchemy_1.6_to_2.0/output_repo/main.py index 1c62632..93a716f 100644 --- a/sqlalchemy_1.6_to_2.0/output_repo/main.py +++ b/sqlalchemy_1.6_to_2.0/output_repo/main.py @@ -1,7 +1,8 @@ # main.py from fastapi import FastAPI, Depends, HTTPException from sqlalchemy.orm import Session -import models, schemas +import models +import schemas from database import SessionLocal, engine from typing import List diff --git a/sqlalchemy_1.6_to_2.0/output_repo/models.py b/sqlalchemy_1.6_to_2.0/output_repo/models.py index 25ad484..d6fcceb 100644 --- a/sqlalchemy_1.6_to_2.0/output_repo/models.py +++ b/sqlalchemy_1.6_to_2.0/output_repo/models.py @@ -1,5 +1,5 @@ from typing import List, Optional -from sqlalchemy import Column, Integer, String, ForeignKey +from sqlalchemy import Integer, String, ForeignKey from sqlalchemy.orm import relationship, Mapped, mapped_column from database import Base diff --git a/sqlalchemy_type_annotations/input_repo/models/organization.py b/sqlalchemy_type_annotations/input_repo/models/organization.py index f5e9560..25da85c 100644 --- a/sqlalchemy_type_annotations/input_repo/models/organization.py +++ b/sqlalchemy_type_annotations/input_repo/models/organization.py @@ -1,6 +1,4 @@ -from sqlalchemy.orm import Mapped -from datetime import datetime from sqlalchemy import Column, Integer, String, DateTime from sqlalchemy.orm import relationship diff --git a/sqlalchemy_type_annotations/input_repo/models/transaction.py b/sqlalchemy_type_annotations/input_repo/models/transaction.py index 422718b..debebe2 100644 --- a/sqlalchemy_type_annotations/input_repo/models/transaction.py +++ b/sqlalchemy_type_annotations/input_repo/models/transaction.py @@ -1,8 +1,5 @@ -from sqlalchemy.orm import Mapped -from decimal import Decimal -from datetime import datetime from sqlalchemy import Column, Integer, String, ForeignKey, Numeric, DateTime from sqlalchemy.orm import relationship diff --git a/sqlalchemy_type_annotations/input_repo/models/user.py b/sqlalchemy_type_annotations/input_repo/models/user.py index 35a6a65..f7537ff 100644 --- a/sqlalchemy_type_annotations/input_repo/models/user.py +++ b/sqlalchemy_type_annotations/input_repo/models/user.py @@ -1,4 +1,3 @@ -from sqlalchemy.orm import Mapped from sqlalchemy import Column, Integer, String, ForeignKey, Boolean from sqlalchemy.orm import relationship diff --git a/unittest_to_pytest/repo-after/tests/test_classes.py b/unittest_to_pytest/repo-after/tests/test_classes.py index 99b75f9..8de04e0 100644 --- a/unittest_to_pytest/repo-after/tests/test_classes.py +++ b/unittest_to_pytest/repo-after/tests/test_classes.py @@ -2,7 +2,7 @@ import pytest import unittest -from unittest.mock import Mock, patch +from unittest.mock import Mock from jj_classes.castle import Castle from jj_classes.character import Character diff --git a/unittest_to_pytest/repo-before/tests/test_classes.py b/unittest_to_pytest/repo-before/tests/test_classes.py index f8259e4..c8de599 100644 --- a/unittest_to_pytest/repo-before/tests/test_classes.py +++ b/unittest_to_pytest/repo-before/tests/test_classes.py @@ -1,7 +1,7 @@ # tests/test_classes.py import unittest -from unittest.mock import Mock, patch +from unittest.mock import Mock from jj_classes.castle import Castle from jj_classes.character import Character