Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jun 17, 2023
1 parent 6014488 commit 0c663af
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pyi.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,9 @@ def _has_bad_hardcoded_returns(
):
return False

if not method.args.posonlyargs and not method.args.args: # weird, but theoretically possible
if (
not method.args.posonlyargs and not method.args.args
): # weird, but theoretically possible
return False

method_name, returns = method.name, method.returns
Expand Down Expand Up @@ -1782,10 +1784,7 @@ def _Y019_error(
non_kw_only_args[0].annotation = None
new_syntax = _unparse_func_node(cleaned_method)
new_syntax = re.sub(rf"\b{typevar_name}\b", "Self", new_syntax)
self.error(
node,
Y019.format(typevar_name=typevar_name, new_syntax=new_syntax),
)
self.error(node, Y019.format(typevar_name=typevar_name, new_syntax=new_syntax))

def _check_instance_method_for_bad_typevars(
self,
Expand Down

0 comments on commit 0c663af

Please sign in to comment.