Skip to content

Commit

Permalink
even more types
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Nov 4, 2024
1 parent 309156f commit fa5eaa3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/python/pyflyby/_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def _get_argspec(arg:Any) -> inspect.FullArgSpec:
"_get_argspec: unexpected %s" % (type(arg).__name__,))


def _requires_parens_as_function(function_name:str):
def _requires_parens_as_function(function_name:str) -> bool:
"""
Returns whether the given string of a callable would require parentheses
around it to call it.
Expand Down Expand Up @@ -552,7 +552,7 @@ class _ParseInterruptedWantSource(Exception):
pass


class UserExpr(object):
class UserExpr:
"""
An expression from user input, and its evaluated value.
Expand Down Expand Up @@ -647,7 +647,7 @@ def __init__(self, arg, namespace, arg_mode, source=None):
else:
raise ValueError("UserExpr(): bad arg_mode=%r" % (arg_mode,))

def _infer_and_evaluate(self):
def _infer_and_evaluate(self) -> None:
if self._original_arg_mode == "raw_value":
pass
elif self._original_arg_mode == "eval":
Expand Down Expand Up @@ -891,7 +891,7 @@ class NotAFunctionError(Exception):
pass


def _get_help(expr, verbosity=1):
def _get_help(expr:UserExpr, verbosity:int=1) -> str:
"""
Construct a help string.
Expand Down Expand Up @@ -1053,7 +1053,7 @@ def auto_apply(function, commandline_args, namespace, arg_mode=None,


@total_ordering
class LoggedList(object):
class LoggedList:
"""
List that logs which members have not yet been accessed (nor removed).
"""
Expand Down

0 comments on commit fa5eaa3

Please sign in to comment.