Skip to content

Commit 00b45dd

Browse files
committed
Add per-file-ignores to flake8
1 parent 27f4287 commit 00b45dd

File tree

6 files changed

+50
-35
lines changed

6 files changed

+50
-35
lines changed

.flake8

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
[flake8]
2-
ignore = E203, E266, E501, W503, F403, F401
2+
per-file-ignores = __init__.py:F401
33
max-line-length = 79
4-
max-complexity = 18
5-
select = B,C,E,F,W,T4,B9

piccolo/columns/__init__.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
from .base import OnUpdate # noqa: F401
2-
from .base import Column, ForeignKeyMeta, OnDelete, Selectable # noqa: F401
3-
from .column_types import BigInt # noqa: F401
4-
from .column_types import Boolean # noqa: F401
5-
from .column_types import Bytea # noqa: F401
6-
from .column_types import Date # noqa: F401
1+
from .base import Column, ForeignKeyMeta, OnDelete, OnUpdate, Selectable
72
from .column_types import (
83
JSON,
94
JSONB,
105
UUID,
116
Array,
7+
BigInt,
8+
Boolean,
9+
Bytea,
10+
Date,
1211
Decimal,
1312
Float,
1413
ForeignKey,
@@ -25,5 +24,5 @@
2524
Timestamptz,
2625
Varchar,
2726
)
28-
from .combination import And, Or, Where # noqa: F401
29-
from .reference import LazyTableReference # noqa: F401
27+
from .combination import And, Or, Where
28+
from .reference import LazyTableReference
Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1-
from .comparison import * # noqa
2-
from .math import * # noqa
3-
from .string import * # noqa
1+
from .comparison import (
2+
ArrayAll,
3+
ArrayAny,
4+
Equal,
5+
GreaterEqualThan,
6+
GreaterThan,
7+
ILike,
8+
In,
9+
IsNotNull,
10+
IsNull,
11+
LessEqualThan,
12+
LessThan,
13+
Like,
14+
NotEqual,
15+
NotIn,
16+
NotLike,
17+
)
18+
from .math import Add, Divide, Multiply, Subtract
19+
from .string import ConcatPostgres, ConcatSQLite

piccolo/query/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
from .base import Query # noqa: F401
2-
from .methods import CreateIndex # noqa: F401
3-
from .methods import Delete # noqa: F401
4-
from .methods import Exists # noqa: F401
1+
from .base import Query
52
from .methods import (
63
Alter,
74
Count,
85
Create,
6+
CreateIndex,
7+
Delete,
98
DropIndex,
9+
Exists,
1010
Insert,
1111
Objects,
1212
Raw,

piccolo/query/methods/__init__.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
from .alter import Alter # noqa: F401
2-
from .count import Count # noqa: F401
3-
from .create import Create # noqa: F401
4-
from .create_index import CreateIndex # noqa: F401
5-
from .delete import Delete # noqa: F401
6-
from .drop_index import DropIndex # noqa: F401
7-
from .exists import Exists # noqa: F401
8-
from .insert import Insert # noqa: F401
9-
from .objects import Objects # noqa: F401
10-
from .raw import Raw # noqa: F401
11-
from .select import Select # noqa: F401
12-
from .table_exists import TableExists # noqa: F401
13-
from .update import Update # noqa: F401
1+
from .alter import Alter
2+
from .count import Count
3+
from .create import Create
4+
from .create_index import CreateIndex
5+
from .delete import Delete
6+
from .drop_index import DropIndex
7+
from .exists import Exists
8+
from .insert import Insert
9+
from .objects import Objects
10+
from .raw import Raw
11+
from .select import Select
12+
from .table_exists import TableExists
13+
from .update import Update

scripts/lint.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22

3-
isort piccolo tests
4-
black piccolo tests
5-
flake8 piccolo tests
6-
mypy piccolo tests
3+
SOURCES="piccolo tests"
4+
5+
isort $SOURCES
6+
black $SOURCES
7+
flake8 $SOURCES
8+
mypy $SOURCES

0 commit comments

Comments
 (0)