Skip to content

Commit 775f2ce

Browse files
committed
ADD: Add mypy.ini to Python client
1 parent 33d75be commit 775f2ce

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

databento/common/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def decode_to_json(raw_metadata: bytes) -> Dict[str, Any]:
2525
2626
"""
2727

28-
def enum_value(fn: Callable) -> Any:
28+
def enum_value(fn: Callable[[Any], Any]) -> Any:
2929
return lambda x: fn(x).value
3030

3131
metadata = decode_metadata(raw_metadata)

mypy.ini

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[mypy]
2+
python_version = 3.7
3+
disallow_untyped_defs = true
4+
disallow_any_generics = true
5+
disallow_subclassing_any = true
6+
ignore_missing_imports = true
7+
namespace_packages = true
8+
no_strict_optional = true
9+
warn_no_return = true
10+
warn_unused_configs = true
11+
warn_unused_ignores = true
12+

requirements_dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
pytest>=7.1.2
22
pytest-mock>=3.8.1
3+
types-requests
4+

0 commit comments

Comments
 (0)