From 855c1a12dac7c5b2492f134661f62f18af2080f3 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 10 Apr 2022 20:08:22 +0300 Subject: [PATCH] Use self for first method parameter --- Tests/test_image.py | 2 +- src/PIL/TiffImagePlugin.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Tests/test_image.py b/Tests/test_image.py index 07cf6eb92..d42fb9f1d 100644 --- a/Tests/test_image.py +++ b/Tests/test_image.py @@ -170,7 +170,7 @@ class TestImage: temp_file = str(tmp_path / "temp.jpg") class FP: - def write(a, b): + def write(self, b): pass fp = FP() diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py index 6b01a552e..b83132167 100644 --- a/src/PIL/TiffImagePlugin.py +++ b/src/PIL/TiffImagePlugin.py @@ -338,12 +338,12 @@ class IFDRational(Rational): self._val = Fraction(value, denominator) @property - def numerator(a): - return a._numerator + def numerator(self): + return self._numerator @property - def denominator(a): - return a._denominator + def denominator(self): + return self._denominator def limit_rational(self, max_denominator): """