File tree Expand file tree Collapse file tree 4 files changed +51
-23
lines changed
hooks/openfeature-hooks-opentelemetry
providers/openfeature-provider-ofrep Expand file tree Collapse file tree 4 files changed +51
-23
lines changed Original file line number Diff line number Diff line change 2929 package :
3030 - " hooks/openfeature-hooks-opentelemetry"
3131 - " providers/openfeature-provider-flagd"
32+ - " providers/openfeature-provider-ofrep"
3233
3334 steps :
3435 - uses : actions/checkout@v4
4950 working-directory : ${{ matrix.package }}
5051
5152 - name : Type checking
52- # TODO: migrate other packages to use their own 'mypy' setup
53- if : matrix.python-version == '3.11' && matrix.package == 'providers/openfeature-provider-flagd'
53+ if : matrix.python-version == '3.11'
5454 working-directory : ${{ matrix.package }}
5555 run : hatch run mypy:run
5656
Original file line number Diff line number Diff line change @@ -14,19 +14,3 @@ repos:
1414 - id : check-yaml
1515 - id : trailing-whitespace
1616 - id : check-merge-conflict
17-
18- - repo : https://github.com/pre-commit/mirrors-mypy
19- rev : v1.11.2
20- hooks :
21- - id : mypy
22- args : [--python-version=3.8]
23- additional_dependencies :
24- - openfeature-sdk>=0.4.0
25- - opentelemetry-api
26- - types-protobuf
27- - types-PyYAML
28- - types-requests
29- - mmh3
30- - semver
31- - panzi-json-logic
32- exclude : providers/openfeature-provider-flagd|tests
Original file line number Diff line number Diff line change @@ -50,10 +50,31 @@ cov = [
5050 " cov-report" ,
5151]
5252
53+ [tool .hatch .envs .mypy ]
54+ dependencies = [
55+ " mypy[faster-cache]>=1.13.0" ,
56+ ]
57+
58+ [tool .hatch .envs .mypy .scripts ]
59+ run = " mypy"
60+
5361[tool .hatch .build .targets .sdist ]
5462exclude = [
5563 " .gitignore" ,
5664]
5765
5866[tool .hatch .build .targets .wheel ]
5967packages = [" src/openfeature" ]
68+
69+ [tool .mypy ]
70+ mypy_path = " src"
71+ files = " src"
72+
73+ python_version = " 3.8" # should be identical to the minimum supported version
74+ namespace_packages = true
75+ explicit_package_bases = true
76+ local_partial_types = true
77+ pretty = true
78+
79+ strict = true
80+ disallow_any_generics = false
Original file line number Diff line number Diff line change @@ -27,26 +27,36 @@ Homepage = "https://github.com/open-feature/python-sdk-contrib"
2727
2828[tool .hatch ]
2929
30- [tool .hatch .envs .default ]
30+ [tool .hatch .envs .hatch-test ]
3131dependencies = [
3232 " coverage[toml]>=6.5" ,
3333 " pytest" ,
3434 " requests-mock" ,
35- " types-requests" ,
3635]
3736
38- [tool .hatch .envs .default .scripts ]
39- test = " pytest {args:tests}"
40- test-cov = " coverage run -m pytest {args:tests}"
37+ [tool .hatch .envs .hatch-test .scripts ]
38+ run = " pytest {args:tests}"
39+ run-cov = " coverage run -m pytest {args:tests}"
40+ cov-combine = " coverage combine"
4141cov-report = [
4242 " coverage xml" ,
4343 " coverage html" ,
44+ " coverage report" ,
4445]
4546cov = [
4647 " test-cov" ,
4748 " cov-report" ,
4849]
4950
51+ [tool .hatch .envs .mypy ]
52+ dependencies = [
53+ " mypy[faster-cache]>=1.13.0" ,
54+ " types-requests" ,
55+ ]
56+
57+ [tool .hatch .envs .mypy .scripts ]
58+ run = " mypy"
59+
5060[tool .hatch .build .targets .sdist ]
5161exclude = [
5262 " .gitignore" ,
@@ -60,3 +70,16 @@ packages = ["src/openfeature"]
6070omit = [
6171 " tests/**" ,
6272]
73+
74+ [tool .mypy ]
75+ mypy_path = " src"
76+ files = " src"
77+
78+ python_version = " 3.8" # should be identical to the minimum supported version
79+ namespace_packages = true
80+ explicit_package_bases = true
81+ local_partial_types = true
82+ pretty = true
83+
84+ strict = true
85+ disallow_any_generics = false
You can’t perform that action at this time.
0 commit comments