forked from maread99/market_prices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mypy.ini
43 lines (38 loc) · 1.76 KB
/
mypy.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
[mypy]
; use underscores in args
; NO comments on same line as an option
warn_unreachable = True
warn_redundant_casts = True
warn_unused_ignores = True
strict_equality = True
show_error_codes = True
; disable_error_code = operator, arg-type, attr-defined, call-arg, misc, assignment, type-var, name-defined
; ---Following flags causing flase positives. TOGGLE to check not hiding other errors behind---
; operator
; false +ve with * operation between int and DateOffset
; 'unsupported operand type for in (pd.Interval)'' - it is a valid operator
; attr-defined false +ve accessing:
; return from df.itertuples with dot notation
; pd.DatetimeIndex attrs inc .tz_localize, .normalize, .day, .time
; pd.IntervalIndex attrs inc .length, .contains, .overlaps
; pd.Timestamp attrs inc .hour, .minute, .value
; pd.Timedelta attrs inc .resolution_string, .components
; pd.Interval attrs inc .left, .right, .overlaps, .closed
; pd.Index attrs inc .is_non_overlapping_monotonic, .freq, tz_localize, tz
; member of an Enum class
; call-arg
; 'Too many arguments for pd.Interval' (there aren't too many).
; 'Unexpected keyword argument "closed" for interval' - it's fine.
; Any optional kwarg passed to pandas.testing method, e.g. assert_frame_equal.
; `pd.DatetimeIndex.get_slice_bound` thinks it needs the 'kind' positional arg.
; misc:
; false +ve when using pd.Timestamp to slice a pd.DataFrame
; assignment:
; mypy believes pd.Timestamp are datetime and pd.Timdelta are timedelta. Easiest to annotate names and supress assignment error.
; type-var:
; mypy doesn't like `max` or `min` being called on Timestamps.
; name-defined:
; mypy doesn't recognise pd.offsets.BaseOffset
ignore_missing_imports = True
; [mypy-exchange_calendars]
; ignore_missing_imports = True