From 28b246b541ce8dca529506fde114d469667f5f96 Mon Sep 17 00:00:00 2001 From: Tyler Romero Date: Tue, 18 Jun 2024 18:15:21 -0700 Subject: [PATCH 1/2] Tell linter its wrong --- src/groundlight/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/groundlight/cli.py b/src/groundlight/cli.py index c15c4035..45c9a7d1 100644 --- a/src/groundlight/cli.py +++ b/src/groundlight/cli.py @@ -26,13 +26,13 @@ class FakeClass: pass fake_instance = FakeClass() - fake_method = method.__get__(fake_instance, FakeClass) + fake_method = method.__get__(fake_instance, FakeClass) # pylint: disable=C2801 @wraps(fake_method) def wrapper(*args, **kwargs): gl = Groundlight() gl_method = vars(Groundlight)[fake_method.__name__] - gl_bound_method = gl_method.__get__(gl, Groundlight) + gl_bound_method = gl_method.__get__(gl, Groundlight) # pylint: disable=C2801 print(gl_bound_method(*args, **kwargs)) # this is where we output to the console # not recommended practice to directly change annotations, but gets around Typer not supporting Union types From 5f77069fb4ac23e1985319ccd5433cc1aa96fb9d Mon Sep 17 00:00:00 2001 From: Tyler Romero Date: Tue, 18 Jun 2024 18:20:01 -0700 Subject: [PATCH 2/2] Pylint disable --- src/groundlight/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/groundlight/cli.py b/src/groundlight/cli.py index 45c9a7d1..36a7c3cc 100644 --- a/src/groundlight/cli.py +++ b/src/groundlight/cli.py @@ -26,13 +26,13 @@ class FakeClass: pass fake_instance = FakeClass() - fake_method = method.__get__(fake_instance, FakeClass) # pylint: disable=C2801 + fake_method = method.__get__(fake_instance, FakeClass) # pylint: disable=all @wraps(fake_method) def wrapper(*args, **kwargs): gl = Groundlight() gl_method = vars(Groundlight)[fake_method.__name__] - gl_bound_method = gl_method.__get__(gl, Groundlight) # pylint: disable=C2801 + gl_bound_method = gl_method.__get__(gl, Groundlight) # pylint: disable=all print(gl_bound_method(*args, **kwargs)) # this is where we output to the console # not recommended practice to directly change annotations, but gets around Typer not supporting Union types