File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change
1
+ Version 3.0.4
2
+ -------------
3
+
4
+ Unreleased
5
+
6
+ - Fix type hint for ``get_or_404 `` return value. :pr: `1208 `
7
+
8
+
1
9
Version 3.0.3
2
10
-------------
3
11
Original file line number Diff line number Diff line change @@ -73,8 +73,10 @@ class Quiz(db.Model):
73
73
item : Quiz = Quiz ()
74
74
db .session .add (item )
75
75
db .session .commit ()
76
- result : t . Optional [ Quiz ] = db .get_or_404 (Quiz , 1 )
76
+ result = db .get_or_404 (Quiz , 1 )
77
77
assert result is item
78
+ if hasattr (t , "assert_type" ):
79
+ t .assert_type (result , Quiz )
78
80
with pytest .raises (NotFound ):
79
81
assert db .get_or_404 (Quiz , 2 )
80
82
db .drop_all ()
Original file line number Diff line number Diff line change @@ -29,7 +29,9 @@ wheel_build_env = .pkg
29
29
constrain_package_deps = true
30
30
use_frozen_constraints = true
31
31
deps = -r requirements/mypy.txt
32
- commands = mypy
32
+ commands =
33
+ mypy --python-version 3.7
34
+ mypy --python-version 3.11
33
35
34
36
[testenv:docs]
35
37
package = wheel
You can’t perform that action at this time.
0 commit comments