From 466091bf0a697cda1a65f302345658f09181f878 Mon Sep 17 00:00:00 2001 From: Tyler White <50381805+IndexSeek@users.noreply.github.com> Date: Sat, 5 Oct 2024 16:29:12 +0000 Subject: [PATCH] ci: resolve ruff check F405 --- koerce/__init__.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/koerce/__init__.py b/koerce/__init__.py index 59f0e93..fcc8be1 100644 --- a/koerce/__init__.py +++ b/koerce/__init__.py @@ -5,13 +5,13 @@ from ._internal import * # noqa: F403 -class _Variable(Deferred): +class _Variable(Deferred): #noqa: F405 def __init__(self, name: str): - builder = Var(name) + builder = Var(name) # noqa: F405 super().__init__(builder) def __pos__(self): - return Capture(self) + return Capture(self) # noqa: F405 def __neg__(self): return self @@ -50,8 +50,8 @@ def var(name): def namespace(module): - p = _Namespace(pattern, module) - d = _Namespace(deferred, module) + p = _Namespace(pattern, module) # noqa: F405 + d = _Namespace(deferred, module) # noqa: F405 return p, d @@ -59,7 +59,7 @@ def replace(matcher): """More convenient syntax for replacing a value with the output of a function.""" def decorator(replacer): - return Replace(matcher, replacer) + return Replace(matcher, replacer) # noqa: F405 return decorator @@ -72,8 +72,8 @@ def __init__(self): def koerce( - pat: Pattern, value: Any, context: Context = None, allow_coercion: bool = False -) -> Any: + pat: Pattern, value: Any, context: Context = None, allow_coercion: bool = False # noqa: F405 +) -> Any: # noqa: F405 """Match a value against a pattern. Parameters @@ -106,10 +106,10 @@ def koerce( ... ] """ - pat = pattern(pat, allow_coercion=allow_coercion) + pat = pattern(pat, allow_coercion=allow_coercion) # noqa: F405 try: return pat.apply(value, context) - except MatchError: + except MatchError: # noqa: F405 return NoMatch