Skip to content

Commit 709ed98

Browse files
committed
fixing linter errors
1 parent fed3b3b commit 709ed98

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

piccolo/columns/column_types.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import typing as t
55
import uuid
66

7-
from piccolo.columns.base import Column, OnDelete, OnUpdate
7+
from piccolo.columns.base import Column, OnDelete, OnUpdate, ForeignKeyMeta
88
from piccolo.querystring import Unquoted
99

1010
if t.TYPE_CHECKING:
@@ -198,6 +198,12 @@ class ForeignKey(Integer):
198198

199199
column_type = "INTEGER"
200200

201+
# This is here just for type inference - the actual value is set by the
202+
# Table metaclass.
203+
_foreign_key_meta = ForeignKeyMeta(
204+
Table, OnDelete.cascade, OnUpdate.cascade
205+
)
206+
201207
def __init__(
202208
self,
203209
references: t.Union[t.Type[Table], str],

tests/columns/test_smallint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_length(self):
3636
row.value = min_value
3737
row.save().run_sync()
3838

39-
if not "TRAVIS" in os.environ:
39+
if "TRAVIS" not in os.environ:
4040
# This stalls out on Travis - not sure why.
4141
with self.assertRaises(Exception):
4242
row.value = max_value + 100

0 commit comments

Comments
 (0)