Skip to content

Commit be00359

Browse files
authored
Remove unused numpy utility functions (pylint-dev#2595)
Follow-up to c7ea1e9.
1 parent d174ca2 commit be00359

File tree

2 files changed

+3
-28
lines changed

2 files changed

+3
-28
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ What's New in astroid 4.0.0?
77
============================
88
Release date: TBA
99

10+
* Removed internal functions ``infer_numpy_member``, ``name_looks_like_numpy_member``, and
11+
``attribute_looks_like_numpy_member`` from ``astroid.brain.brain_numpy_utils``.
12+
1013
* Fix crashes with large positive and negative list multipliers.
1114

1215
Closes #2521

astroid/brain/brain_numpy_utils.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ def infer_numpy_attribute(
4848
return extracted_node.infer(context=context)
4949

5050

51-
# TODO: Deprecate and remove this function
52-
def infer_numpy_member(src, node, context: InferenceContext | None = None):
53-
node = extract_node(src)
54-
return node.infer(context=context)
55-
56-
5751
def _is_a_numpy_module(node: Name) -> bool:
5852
"""
5953
Returns True if the node is a representation of a numpy module.
@@ -96,25 +90,3 @@ def attribute_name_looks_like_numpy_member(
9690
and isinstance(node.expr, Name)
9791
and _is_a_numpy_module(node.expr)
9892
)
99-
100-
101-
# TODO: Deprecate and remove this function
102-
def name_looks_like_numpy_member(member_name: str, node: Name) -> bool:
103-
"""
104-
Returns True if the Name is a member of numpy whose
105-
name is member_name.
106-
"""
107-
return node.name == member_name and node.root().name.startswith("numpy")
108-
109-
110-
# TODO: Deprecate and remove this function
111-
def attribute_looks_like_numpy_member(member_name: str, node: Attribute) -> bool:
112-
"""
113-
Returns True if the Attribute is a member of numpy whose
114-
name is member_name.
115-
"""
116-
return (
117-
node.attrname == member_name
118-
and isinstance(node.expr, Name)
119-
and _is_a_numpy_module(node.expr)
120-
)

0 commit comments

Comments
 (0)