diff options
author | Ronny Pfannschmidt <opensource@ronnypfannschmidt.de> | 2023-03-22 16:35:11 +0100 |
---|---|---|
committer | Ronny Pfannschmidt <opensource@ronnypfannschmidt.de> | 2023-03-29 17:04:12 +0200 |
commit | b9ed7bb7f36c2954a2861ea01adbb241bb49455b (patch) | |
tree | 839d61f5ce54da538cd2970903375f1da69dea08 /src/setuptools_scm/utils.py | |
parent | d1660231d257bdccaed9c01497b0ca79390e8f6f (diff) | |
download | setuptools-scm-b9ed7bb7f36c2954a2861ea01adbb241bb49455b.tar.gz |
chore: drop unused function_has_arg
Diffstat (limited to 'src/setuptools_scm/utils.py')
-rw-r--r-- | src/setuptools_scm/utils.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/setuptools_scm/utils.py b/src/setuptools_scm/utils.py index 9f800e4..bb313fc 100644 --- a/src/setuptools_scm/utils.py +++ b/src/setuptools_scm/utils.py @@ -8,8 +8,6 @@ import subprocess import textwrap import warnings from pathlib import Path -from types import CodeType -from types import FunctionType from typing import Sequence from typing import TYPE_CHECKING @@ -31,12 +29,6 @@ def data_from_mime(path: _t.PathT) -> dict[str, str]: return data -def function_has_arg(fn: object | FunctionType, argname: str) -> bool: - assert isinstance(fn, FunctionType) - code: CodeType = fn.__code__ - return argname in code.co_varnames - - def has_command(name: str, args: Sequence[str] = ["help"], warn: bool = True) -> bool: try: p = _run_cmd.run([name, *args], cwd=".", timeout=5) |