Skip to content

Commit 28fc685

Browse files
authored
Rename to is_version_str_assignment()
1 parent 84dcfc5 commit 28fc685

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flit_core/flit_core/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def get_docstring_and_version_via_ast(target):
148148
with target_path.open('rb') as f:
149149
node = ast.parse(f.read())
150150
for child in node.body:
151-
if is_version_str_node(child):
151+
if is_version_str_assignment(child):
152152
if sys.version_info >= (3, 8):
153153
version = child.value.value
154154
else:
@@ -157,7 +157,7 @@ def get_docstring_and_version_via_ast(target):
157157
return ast.get_docstring(node), version
158158

159159

160-
def is_version_str_node(node, /):
160+
def is_version_str_assignment(node):
161161
"""Check if *node* is a simple string assignment to __version__"""
162162
if not isinstance(node, (ast.Assign, ast.AnnAssign)):
163163
return False

0 commit comments

Comments
 (0)