File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 249249 "importlib.resources.open_text" ,
250250 "importlib.resources.path" ,
251251 "importlib.resources.read_binary" ,
252- "importlib.resources.read_text" ,
252+ # "importlib.resources.read_text", #un-deprecated in Python 3.13
253253 },
254254 (3 , 10 , 0 ): {
255255 "_sqlite3.enable_shared_cache" ,
Original file line number Diff line number Diff line change @@ -68,3 +68,16 @@ def infer_func(
6868 )
6969 with self .assertNoMessages ():
7070 self .checker .visit_call (node )
71+
72+ def test_importlib_read_text_not_deprecated (self ) -> None :
73+ """Ensure importlib.resources.read_text is NOT flagged as deprecated."""
74+ assign_node = astroid .extract_node ("""
75+ from importlib.resources import read_text
76+ data = read_text("mypkg", "file.txt")
77+ """ )
78+ call_node = assign_node .value # The value of the Assign node is the Call node
79+ with self .assertNoMessages ():
80+ self .checker .visit_call (call_node )
81+
82+
83+
You can’t perform that action at this time.
0 commit comments