Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9d94145

Browse files
committedMay 16, 2025·
change to ruff
1 parent afd11b7 commit 9d94145

File tree

12 files changed

+227
-654
lines changed

12 files changed

+227
-654
lines changed
 

‎.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SPDX-FileCopyrightText: 2024 Justin Myers for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
5+
.py text eol=lf
6+
.rst text eol=lf
7+
.txt text eol=lf
8+
.yaml text eol=lf
9+
.toml text eol=lf
10+
.license text eol=lf
11+
.md text eol=lf

‎.pre-commit-config.yaml

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,21 @@
1-
# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò
1+
# SPDX-FileCopyrightText: 2024 Justin Myers for Adafruit Industries
22
#
33
# SPDX-License-Identifier: Unlicense
44

55
repos:
6-
- repo: https://github.com/python/black
7-
rev: 23.3.0
8-
hooks:
9-
- id: black
10-
- repo: https://github.com/fsfe/reuse-tool
11-
rev: v1.1.2
12-
hooks:
13-
- id: reuse
146
- repo: https://github.com/pre-commit/pre-commit-hooks
15-
rev: v4.4.0
7+
rev: v4.5.0
168
hooks:
179
- id: check-yaml
1810
- id: end-of-file-fixer
1911
- id: trailing-whitespace
20-
- repo: https://github.com/pycqa/pylint
21-
rev: v2.17.4
12+
- repo: https://github.com/astral-sh/ruff-pre-commit
13+
rev: v0.3.4
2214
hooks:
23-
- id: pylint
24-
name: pylint (library code)
25-
types: [python]
26-
args:
27-
- --disable=consider-using-f-string
28-
exclude: "^(docs/|examples/|tests/|setup.py$)"
29-
- id: pylint
30-
name: pylint (example code)
31-
description: Run pylint rules on "examples/*.py" files
32-
types: [python]
33-
files: "^examples/"
34-
args:
35-
- --disable=missing-docstring,invalid-name,consider-using-f-string,duplicate-code
36-
- id: pylint
37-
name: pylint (test code)
38-
description: Run pylint rules on "tests/*.py" files
39-
types: [python]
40-
files: "^tests/"
41-
args:
42-
- --disable=missing-docstring,consider-using-f-string,duplicate-code
15+
- id: ruff-format
16+
- id: ruff
17+
args: ["--fix"]
18+
- repo: https://github.com/fsfe/reuse-tool
19+
rev: v3.0.1
20+
hooks:
21+
- id: reuse

‎.pylintrc

Lines changed: 0 additions & 399 deletions
This file was deleted.

‎README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Introduction
1313
:target: https://github.com/adafruit/Adafruit_CircuitPython_datetime/actions
1414
:alt: Build Status
1515

16-
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
17-
:target: https://github.com/psf/black
18-
:alt: Code Style: Black
16+
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
17+
:target: https://github.com/astral-sh/ruff
18+
:alt: Code Style: Ruff
1919

2020
Basic date and time types. Implements a subset of the `CPython datetime module <https://docs.python.org/3/library/datetime.html>`_.
2121

‎adafruit_datetime.py

Lines changed: 51 additions & 130 deletions
Large diffs are not rendered by default.

‎docs/api.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
.. If your library file(s) are nested in a directory (e.g. /adafruit_foo/foo.py)
55
.. use this format as the module name: "adafruit_foo.foo"
66
7+
API Reference
8+
#############
9+
710
.. automodule:: adafruit_datetime
811
:members:

‎docs/conf.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
# -*- coding: utf-8 -*-
2-
31
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
42
#
53
# SPDX-License-Identifier: MIT
64

5+
import datetime
76
import os
87
import sys
9-
import datetime
108

119
sys.path.insert(0, os.path.abspath(".."))
1210

@@ -51,9 +49,7 @@
5149
creation_year = "2021"
5250
current_year = str(datetime.datetime.now().year)
5351
year_duration = (
54-
current_year
55-
if current_year == creation_year
56-
else creation_year + " - " + current_year
52+
current_year if current_year == creation_year else creation_year + " - " + current_year
5753
)
5854
copyright = year_duration + " Brent Rubell"
5955
author = "Brent Rubell"

‎examples/datetime_simpletest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Example of working with a `datetime` object
1313
# from https://docs.python.org/3/library/datetime.html#examples-of-usage-datetime
14-
from adafruit_datetime import datetime, date, time
14+
from adafruit_datetime import date, datetime, time
1515

1616
# Using datetime.combine()
1717
d = date(2005, 7, 14)

‎ruff.toml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# SPDX-FileCopyrightText: 2024 Tim Cocks for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
target-version = "py38"
6+
line-length = 100
7+
8+
[lint]
9+
preview = true
10+
select = ["I", "PL", "UP"]
11+
12+
extend-select = [
13+
"D419", # empty-docstring
14+
"E501", # line-too-long
15+
"W291", # trailing-whitespace
16+
"PLC0414", # useless-import-alias
17+
"PLC2401", # non-ascii-name
18+
"PLC2801", # unnecessary-dunder-call
19+
"PLC3002", # unnecessary-direct-lambda-call
20+
"E999", # syntax-error
21+
"PLE0101", # return-in-init
22+
"F706", # return-outside-function
23+
"F704", # yield-outside-function
24+
"PLE0116", # continue-in-finally
25+
"PLE0117", # nonlocal-without-binding
26+
"PLE0241", # duplicate-bases
27+
"PLE0302", # unexpected-special-method-signature
28+
"PLE0604", # invalid-all-object
29+
"PLE0605", # invalid-all-format
30+
"PLE0643", # potential-index-error
31+
"PLE0704", # misplaced-bare-raise
32+
"PLE1141", # dict-iter-missing-items
33+
"PLE1142", # await-outside-async
34+
"PLE1205", # logging-too-many-args
35+
"PLE1206", # logging-too-few-args
36+
"PLE1307", # bad-string-format-type
37+
"PLE1310", # bad-str-strip-call
38+
"PLE1507", # invalid-envvar-value
39+
"PLE2502", # bidirectional-unicode
40+
"PLE2510", # invalid-character-backspace
41+
"PLE2512", # invalid-character-sub
42+
"PLE2513", # invalid-character-esc
43+
"PLE2514", # invalid-character-nul
44+
"PLE2515", # invalid-character-zero-width-space
45+
"PLR0124", # comparison-with-itself
46+
"PLR0202", # no-classmethod-decorator
47+
"PLR0203", # no-staticmethod-decorator
48+
"UP004", # useless-object-inheritance
49+
"PLR0206", # property-with-parameters
50+
"PLR0904", # too-many-public-methods
51+
"PLR0911", # too-many-return-statements
52+
"PLR0912", # too-many-branches
53+
"PLR0913", # too-many-arguments
54+
"PLR0914", # too-many-locals
55+
"PLR0915", # too-many-statements
56+
"PLR0916", # too-many-boolean-expressions
57+
"PLR1702", # too-many-nested-blocks
58+
"PLR1704", # redefined-argument-from-local
59+
"PLR1711", # useless-return
60+
"C416", # unnecessary-comprehension
61+
"PLR1733", # unnecessary-dict-index-lookup
62+
"PLR1736", # unnecessary-list-index-lookup
63+
64+
# ruff reports this rule is unstable
65+
#"PLR6301", # no-self-use
66+
67+
"PLW0108", # unnecessary-lambda
68+
"PLW0120", # useless-else-on-loop
69+
"PLW0127", # self-assigning-variable
70+
"PLW0129", # assert-on-string-literal
71+
"B033", # duplicate-value
72+
"PLW0131", # named-expr-without-context
73+
"PLW0245", # super-without-brackets
74+
"PLW0406", # import-self
75+
"PLW0602", # global-variable-not-assigned
76+
"PLW0603", # global-statement
77+
"PLW0604", # global-at-module-level
78+
79+
# fails on the try: import typing used by libraries
80+
#"F401", # unused-import
81+
82+
"F841", # unused-variable
83+
"E722", # bare-except
84+
"PLW0711", # binary-op-exception
85+
"PLW1501", # bad-open-mode
86+
"PLW1508", # invalid-envvar-default
87+
"PLW1509", # subprocess-popen-preexec-fn
88+
"PLW2101", # useless-with-lock
89+
"PLW3301", # nested-min-max
90+
]
91+
92+
ignore = [
93+
"PLR2004", # magic-value-comparison
94+
"UP030", # format literals
95+
"PLW1514", # unspecified-encoding
96+
"PLR0913", # too-many-arguments
97+
"PLR0915", # too-many-statements
98+
"PLR0917", # too-many-positional-arguments
99+
"PLR0904", # too-many-public-methods
100+
"PLR0912", # too-many-branches
101+
"PLR0916", # too-many-boolean-expressions
102+
"PLR6301", # could-be-static no-self-use
103+
"PLC0415", # import outside toplevel
104+
"PLC2701", # private import
105+
"PLW2901", # loop var overwrite
106+
"PLW1641", # obj not implement hash function
107+
"PLR0914", # too many locals
108+
]
109+
110+
[format]
111+
line-ending = "lf"

‎tests/test_date.py

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# pylint:disable=invalid-name, no-member, wrong-import-position, undefined-variable, no-self-use, cell-var-from-loop, too-many-public-methods, fixme, import-outside-toplevel, unused-argument, too-few-public-methods
1313
import sys
1414
import unittest
15+
from datetime import MAXYEAR, MINYEAR
1516

1617
# CPython standard implementation
1718
from datetime import date as cpython_date
18-
from datetime import MINYEAR, MAXYEAR
1919

2020
# CircuitPython subset implementation
2121
sys.path.append("..")
@@ -130,9 +130,7 @@ def test_today(self):
130130

131131
# It worked or it didn't. If it didn't, assume it's reason #2, and
132132
# let the test pass if they're within half a second of each other.
133-
self.assertTrue(
134-
today == todayagain or abs(todayagain - today) < timedelta(seconds=0.5)
135-
)
133+
self.assertTrue(today == todayagain or abs(todayagain - today) < timedelta(seconds=0.5))
136134

137135
def test_weekday(self):
138136
for i in range(7):
@@ -155,9 +153,7 @@ def test_weekday(self):
155153
cpython_date(1956, 1, 2 + i).isoweekday(),
156154
)
157155

158-
@unittest.skip(
159-
"Skip for CircuitPython - isocalendar() not implemented for date objects."
160-
)
156+
@unittest.skip("Skip for CircuitPython - isocalendar() not implemented for date objects.")
161157
def test_isocalendar(self):
162158
# Check examples from
163159
# http://www.phys.uu.nl/~vgent/calendar/isocalendar.htm
@@ -187,9 +183,7 @@ def test_ctime(self):
187183
t = cpy_date(2002, 3, 2)
188184
self.assertEqual(t.ctime(), "Sat Mar 2 00:00:00 2002")
189185

190-
@unittest.skip(
191-
"Skip for CircuitPython - strftime() not implemented for date objects."
192-
)
186+
@unittest.skip("Skip for CircuitPython - strftime() not implemented for date objects.")
193187
def test_strftime(self):
194188
t = cpy_date(2005, 3, 2)
195189
self.assertEqual(t.strftime("m:%m d:%d y:%y"), "m:03 d:02 y:05")
@@ -252,9 +246,7 @@ def strftime(self, format_spec):
252246
self.assertEqual(a.__format__(fmt), dt.strftime(fmt))
253247
self.assertEqual(b.__format__(fmt), 'B')"""
254248

255-
@unittest.skip(
256-
"Skip for CircuitPython - min/max/resolution not implemented for date objects."
257-
)
249+
@unittest.skip("Skip for CircuitPython - min/max/resolution not implemented for date objects.")
258250
def test_resolution_info(self):
259251
# XXX: Should min and max respect subclassing?
260252
if issubclass(cpy_date, datetime):
@@ -405,9 +397,7 @@ def __ge__(self, other):
405397
self.assertEqual(our < their, True)
406398
self.assertEqual(their < our, False)
407399

408-
@unittest.skip(
409-
"Skip for CircuitPython - min/max date attributes not implemented yet."
410-
)
400+
@unittest.skip("Skip for CircuitPython - min/max date attributes not implemented yet.")
411401
def test_bool(self):
412402
# All dates are considered true.
413403
self.assertTrue(cpy_date.min)

‎tests/test_datetime.py

Lines changed: 24 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,17 @@
1414

1515
# CircuitPython subset implementation
1616
sys.path.append("..")
17-
from adafruit_datetime import datetime as cpy_datetime
18-
from adafruit_datetime import timedelta
19-
from adafruit_datetime import tzinfo
20-
from adafruit_datetime import date
21-
from adafruit_datetime import time
22-
from adafruit_datetime import timezone
23-
2417
import unittest
25-
from test import support
26-
from test_date import TestDate
18+
from datetime import MAXYEAR, MINYEAR
2719

2820
# CPython standard implementation
2921
from datetime import datetime as cpython_datetime
30-
from datetime import MINYEAR, MAXYEAR
22+
from test import support
23+
24+
from test_date import TestDate
25+
26+
from adafruit_datetime import date, time, timedelta, timezone, tzinfo
27+
from adafruit_datetime import datetime as cpy_datetime
3128

3229

3330
# TZinfo test
@@ -158,12 +155,8 @@ def test_isoformat(self):
158155
self.assertEqual(t.isoformat(timespec="hours"), "0001-02-03T04")
159156
self.assertEqual(t.isoformat(timespec="minutes"), "0001-02-03T04:05")
160157
self.assertEqual(t.isoformat(timespec="seconds"), "0001-02-03T04:05:01")
161-
self.assertEqual(
162-
t.isoformat(timespec="milliseconds"), "0001-02-03T04:05:01.000"
163-
)
164-
self.assertEqual(
165-
t.isoformat(timespec="microseconds"), "0001-02-03T04:05:01.000123"
166-
)
158+
self.assertEqual(t.isoformat(timespec="milliseconds"), "0001-02-03T04:05:01.000")
159+
self.assertEqual(t.isoformat(timespec="microseconds"), "0001-02-03T04:05:01.000123")
167160
self.assertEqual(t.isoformat(timespec="auto"), "0001-02-03T04:05:01.000123")
168161
self.assertEqual(t.isoformat(sep=" ", timespec="minutes"), "0001-02-03 04:05")
169162
self.assertRaises(ValueError, t.isoformat, timespec="foo")
@@ -173,23 +166,15 @@ def test_isoformat(self):
173166
self.assertEqual(str(t), "0001-02-03 04:05:01.000123")
174167

175168
t = self.theclass(1, 2, 3, 4, 5, 1, 999500, tzinfo=timezone.utc)
176-
self.assertEqual(
177-
t.isoformat(timespec="milliseconds"), "0001-02-03T04:05:01.999+00:00"
178-
)
169+
self.assertEqual(t.isoformat(timespec="milliseconds"), "0001-02-03T04:05:01.999+00:00")
179170

180171
t = self.theclass(1, 2, 3, 4, 5, 1, 999500)
181-
self.assertEqual(
182-
t.isoformat(timespec="milliseconds"), "0001-02-03T04:05:01.999"
183-
)
172+
self.assertEqual(t.isoformat(timespec="milliseconds"), "0001-02-03T04:05:01.999")
184173

185174
t = self.theclass(1, 2, 3, 4, 5, 1)
186175
self.assertEqual(t.isoformat(timespec="auto"), "0001-02-03T04:05:01")
187-
self.assertEqual(
188-
t.isoformat(timespec="milliseconds"), "0001-02-03T04:05:01.000"
189-
)
190-
self.assertEqual(
191-
t.isoformat(timespec="microseconds"), "0001-02-03T04:05:01.000000"
192-
)
176+
self.assertEqual(t.isoformat(timespec="milliseconds"), "0001-02-03T04:05:01.000")
177+
self.assertEqual(t.isoformat(timespec="microseconds"), "0001-02-03T04:05:01.000000")
193178

194179
t = self.theclass(2, 3, 2)
195180
self.assertEqual(t.isoformat(), "0002-03-02T00:00:00")
@@ -284,9 +269,7 @@ def test_more_ctime(self):
284269

285270
# So test a case where that difference doesn't matter.
286271
t = self.theclass(2002, 3, 22, 18, 3, 5, 123)
287-
self.assertEqual(
288-
t.ctime(), cpython_time.ctime(cpython_time.mktime(t.timetuple()))
289-
)
272+
self.assertEqual(t.ctime(), cpython_time.ctime(cpython_time.mktime(t.timetuple())))
290273

291274
def test_tz_independent_comparing(self):
292275
dt1 = self.theclass(2002, 3, 1, 9, 0, 0)
@@ -435,16 +418,12 @@ def test_computations(self):
435418
a + (week + day + hour + millisec),
436419
self.theclass(2002, 3, 10, 18, 6, 0, 1000),
437420
)
438-
self.assertEqual(
439-
a + (week + day + hour + millisec), (((a + week) + day) + hour) + millisec
440-
)
421+
self.assertEqual(a + (week + day + hour + millisec), (((a + week) + day) + hour) + millisec)
441422
self.assertEqual(
442423
a - (week + day + hour + millisec),
443424
self.theclass(2002, 2, 22, 16, 5, 59, 999000),
444425
)
445-
self.assertEqual(
446-
a - (week + day + hour + millisec), (((a - week) - day) - hour) - millisec
447-
)
426+
self.assertEqual(a - (week + day + hour + millisec), (((a - week) - day) - hour) - millisec)
448427
# Add/sub ints or floats should be illegal
449428
for i in 1, 1.0:
450429
self.assertRaises(TypeError, lambda: a + i)
@@ -532,12 +511,8 @@ def test_timestamp_naive(self):
532511
# Missing hour
533512
t0 = self.theclass(2012, 3, 11, 2, 30)
534513
t1 = t0.replace(fold=1)
535-
self.assertEqual(
536-
self.theclass.fromtimestamp(t1.timestamp()), t0 - timedelta(hours=1)
537-
)
538-
self.assertEqual(
539-
self.theclass.fromtimestamp(t0.timestamp()), t1 + timedelta(hours=1)
540-
)
514+
self.assertEqual(self.theclass.fromtimestamp(t1.timestamp()), t0 - timedelta(hours=1))
515+
self.assertEqual(self.theclass.fromtimestamp(t0.timestamp()), t1 + timedelta(hours=1))
541516
# Ambiguous hour defaults to DST
542517
t = self.theclass(2012, 11, 4, 1, 30)
543518
self.assertEqual(self.theclass.fromtimestamp(t.timestamp()), t)
@@ -556,9 +531,7 @@ def test_timestamp_aware(self):
556531
self.assertEqual(t.timestamp(), 0.0)
557532
t = self.theclass(1970, 1, 1, 1, 2, 3, 4, tzinfo=timezone.utc)
558533
self.assertEqual(t.timestamp(), 3600 + 2 * 60 + 3 + 4 * 1e-6)
559-
t = self.theclass(
560-
1970, 1, 1, 1, 2, 3, 4, tzinfo=timezone(timedelta(hours=-5), "EST")
561-
)
534+
t = self.theclass(1970, 1, 1, 1, 2, 3, 4, tzinfo=timezone(timedelta(hours=-5), "EST"))
562535
self.assertEqual(t.timestamp(), 18000 + 3600 + 2 * 60 + 3 + 4 * 1e-6)
563536

564537
@unittest.skip("Not implemented - gmtime")
@@ -609,9 +582,7 @@ def test_timestamp_limits(self):
609582
min_ts = min_dt.timestamp()
610583
try:
611584
# date 0001-01-01 00:00:00+00:00: timestamp=-62135596800
612-
self.assertEqual(
613-
self.theclass.fromtimestamp(min_ts, tz=timezone.utc), min_dt
614-
)
585+
self.assertEqual(self.theclass.fromtimestamp(min_ts, tz=timezone.utc), min_dt)
615586
except (OverflowError, OSError) as exc:
616587
# the date 0001-01-01 doesn't fit into 32-bit time_t,
617588
# or platform doesn't support such very old date
@@ -718,7 +689,7 @@ def test_strptime(self):
718689
sign = "+"
719690
seconds = tzseconds
720691
hours, minutes = divmod(seconds // 60, 60)
721-
dtstr = "{}{:02d}{:02d} {}".format(sign, hours, minutes, tzname)
692+
dtstr = f"{sign}{hours:02d}{minutes:02d} {tzname}"
722693
dt = strptime(dtstr, "%z %Z")
723694
self.assertEqual(dt.utcoffset(), timedelta(seconds=tzseconds))
724695
self.assertEqual(dt.tzname(), tzname)
@@ -766,9 +737,7 @@ def test_strptime_single_digit(self):
766737
]
767738
for reason, string, format, target in inputs:
768739
reason = "test single digit " + reason
769-
with self.subTest(
770-
reason=reason, string=string, format=format, target=target
771-
):
740+
with self.subTest(reason=reason, string=string, format=format, target=target):
772741
newdate = strptime(string, format)
773742
self.assertEqual(newdate, target, msg=reason)
774743

@@ -805,9 +774,7 @@ def test_more_timetuple(self):
805774
def test_more_strftime(self):
806775
# This tests fields beyond those tested by the TestDate.test_strftime.
807776
t = self.theclass(2004, 12, 31, 6, 22, 33, 47)
808-
self.assertEqual(
809-
t.strftime("%m %d %y %f %S %M %H %j"), "12 31 04 000047 33 22 06 366"
810-
)
777+
self.assertEqual(t.strftime("%m %d %y %f %S %M %H %j"), "12 31 04 000047 33 22 06 366")
811778
for (s, us), z in [
812779
((33, 123), "33.000123"),
813780
((33, 0), "33"),
@@ -996,9 +963,7 @@ def __new__(cls, *args, **kwargs):
996963
for constr_name, constr_args, expected in test_cases:
997964
for base_obj in (DateTimeSubclass, base_d):
998965
# Test both the classmethod and method
999-
with self.subTest(
1000-
base_obj_type=type(base_obj), constr_name=constr_name
1001-
):
966+
with self.subTest(base_obj_type=type(base_obj), constr_name=constr_name):
1002967
constructor = getattr(base_obj, constr_name)
1003968

1004969
dt = constructor(*constr_args)

‎tests/test_time.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
import sys
1515

1616
sys.path.append("..")
17-
from adafruit_datetime import time as cpy_time
17+
import unittest
1818

1919
# CPython standard implementation
2020
from datetime import time as cpython_time
21-
import unittest
2221

22+
from adafruit_datetime import time as cpy_time
2323

2424
# An arbitrary collection of objects of non-datetime types, for testing
2525
# mixed-type comparisons.
@@ -274,12 +274,8 @@ def test_str(self):
274274
def test_repr(self):
275275
name = "datetime." + self.theclass.__name__
276276
self.assertEqual(repr(self.theclass(1, 2, 3, 4)), "%s(1, 2, 3, 4)" % name)
277-
self.assertEqual(
278-
repr(self.theclass(10, 2, 3, 4000)), "%s(10, 2, 3, 4000)" % name
279-
)
280-
self.assertEqual(
281-
repr(self.theclass(0, 2, 3, 400000)), "%s(0, 2, 3, 400000)" % name
282-
)
277+
self.assertEqual(repr(self.theclass(10, 2, 3, 4000)), "%s(10, 2, 3, 4000)" % name)
278+
self.assertEqual(repr(self.theclass(0, 2, 3, 400000)), "%s(0, 2, 3, 400000)" % name)
283279
self.assertEqual(repr(self.theclass(12, 2, 3, 0)), "%s(12, 2, 3)" % name)
284280
self.assertEqual(repr(self.theclass(23, 15, 0, 0)), "%s(23, 15)" % name)
285281

0 commit comments

Comments
 (0)
Please sign in to comment.