Skip to content

Commit b41c92a

Browse files
committed
Improve filterwarnings
1 parent 50bed32 commit b41c92a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

flixopt/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@
6767

6868
# tsam: Time series aggregation library
6969
# - UserWarning: Informational message about minimal value constraints during clustering.
70-
warnings.filterwarnings('ignore', category=UserWarning, message='.*minimal value.*exceeds.*', module='tsam')
70+
warnings.filterwarnings(
71+
'ignore',
72+
category=UserWarning,
73+
message='.*minimal value.*exceeds.*',
74+
module='tsam.timeseriesaggregation', # More specific if possible
75+
)
7176
# TODO: Might be able to fix it in flixopt?
7277

7378
# linopy: Linear optimization library

0 commit comments

Comments
 (0)