Skip to content

Commit 3970262

Browse files
committed
Cleanup
Removed unused imports Removed commented out unused paramers Sorted imports
1 parent e9008ae commit 3970262

12 files changed

+13
-23
lines changed

src/masoniteorm/query/QueryBuilder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import inspect
22
from copy import deepcopy
33
from datetime import datetime
4-
from typing import Any, Dict, List, Optional, Callable
4+
from typing import Any, Callable, Dict, List, Optional
55

66
from ..collection.Collection import Collection
77
from ..config import load_config
88
from ..exceptions import (
99
HTTP404,
1010
ConnectionNotRegistered,
11+
InvalidArgument,
1112
ModelNotFound,
1213
MultipleRecordsFound,
13-
InvalidArgument,
1414
)
1515
from ..expressions.expressions import (
1616
AggregateExpression,

src/masoniteorm/query/grammars/BaseGrammar.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import re
22

33
from ...expressions.expressions import (
4-
SubGroupExpression,
5-
SubSelectExpression,
6-
SelectExpression,
74
JoinClause,
85
OnClause,
6+
SelectExpression,
7+
SubGroupExpression,
8+
SubSelectExpression,
99
)
1010

1111

src/masoniteorm/query/grammars/PostgresGrammar.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from .BaseGrammar import BaseGrammar
21
import re
32

3+
from .BaseGrammar import BaseGrammar
4+
45

56
class PostgresGrammar(BaseGrammar):
67
"""Postgres grammar class."""

src/masoniteorm/query/grammars/SQLiteGrammar.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from .BaseGrammar import BaseGrammar
21
import re
32

3+
from .BaseGrammar import BaseGrammar
4+
45

56
class SQLiteGrammar(BaseGrammar):
67
"""SQLite grammar class."""
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .SQLiteGrammar import SQLiteGrammar
2-
from .PostgresGrammar import PostgresGrammar
3-
from .MySQLGrammar import MySQLGrammar
41
from .MSSQLGrammar import MSSQLGrammar
2+
from .MySQLGrammar import MySQLGrammar
3+
from .PostgresGrammar import PostgresGrammar
4+
from .SQLiteGrammar import SQLiteGrammar
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1+
from .MSSQLPostProcessor import MSSQLPostProcessor
12
from .MySQLPostProcessor import MySQLPostProcessor
23
from .PostgresPostProcessor import PostgresPostProcessor
34
from .SQLitePostProcessor import SQLitePostProcessor
4-
from .MSSQLPostProcessor import MSSQLPostProcessor

tests/postgres/builder/test_postgres_transaction.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def get_builder(self, table="users"):
2525
grammar=PostgresGrammar,
2626
connection=connection,
2727
table=table,
28-
# model=User,
2928
connection_details=DATABASES,
3029
).on("postgres")
3130

tests/sqlite/builder/test_sqlite_builder_insert.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
from src.masoniteorm.models import Model
77
from src.masoniteorm.query import QueryBuilder
88
from src.masoniteorm.query.grammars import SQLiteGrammar
9-
from src.masoniteorm.relationships import belongs_to
10-
from tests.utils import MockConnectionFactory
119

1210

1311
class User(Model):
@@ -26,7 +24,6 @@ def get_builder(self, table="users"):
2624
connection_class=connection,
2725
connection="dev",
2826
table=table,
29-
# model=User,
3027
connection_details=DATABASES,
3128
).on("dev")
3229

tests/sqlite/builder/test_sqlite_builder_pagination.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
from src.masoniteorm.models import Model
77
from src.masoniteorm.query import QueryBuilder
88
from src.masoniteorm.query.grammars import SQLiteGrammar
9-
from src.masoniteorm.relationships import belongs_to
10-
from tests.utils import MockConnectionFactory
119

1210

1311
class User(Model):

tests/sqlite/builder/test_sqlite_query_builder_eager_loading.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from src.masoniteorm.query import QueryBuilder
88
from src.masoniteorm.query.grammars import SQLiteGrammar
99
from src.masoniteorm.relationships import belongs_to, has_many
10-
from tests.utils import MockConnectionFactory
1110

1211

1312
class Logo(Model):

0 commit comments

Comments
 (0)