MCPcopy Create free account
hub / github.com/shapely/shapely / make_msg

Function make_msg

shapely/decorators.py:150–169  ·  view source on GitHub ↗
(n_args: int)

Source from the content-addressed store, hash-verified

148
149 @lru_cache(10)
150 def make_msg(n_args: int):
151 used = [name for idx, name in deprecate_positions if idx < n_args]
152
153 if len(used) == 1:
154 args_txt = f"`{used[0]}`"
155 plr = ""
156 isare = "is"
157 else:
158 plr = "s"
159 isare = "are"
160 if len(used) == 2:
161 args_txt = " and ".join(f"`{u}`" for u in used)
162 else:
163 args_txt = ", ".join(f"`{u}`" for u in used[:-1])
164 args_txt += f", and `{used[-1]}`"
165
166 return (
167 f"positional argument{plr} {args_txt} for `{func.__name__}` "
168 f"{isare} deprecated. Please use keyword argument{plr} instead."
169 )
170
171 @wraps(func)
172 def wrapper(*args, **kwargs):

Callers 1

wrapperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…