Add ruff upgrade

This commit is contained in:
Justin Myers 2024-03-23 09:32:42 -07:00
parent 95168b0a27
commit 76e5276bbc
3 changed files with 4 additions and 6 deletions

View file

@ -271,9 +271,9 @@ class NetworkBase:
year_day = int(times[2])
week_day = int(times[3])
is_dst = None # no way to know yet
year, month, mday = [int(x) for x in the_date.split("-")]
year, month, mday = (int(x) for x in the_date.split("-"))
the_time = the_time.split(".")[0]
hours, minutes, seconds = [int(x) for x in the_time.split(":")]
hours, minutes, seconds = (int(x) for x in the_time.split(":"))
now = time.struct_time(
(year, month, mday, hours, minutes, seconds, week_day, year_day, is_dst)
)

View file

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
#
# SPDX-License-Identifier: MIT

View file

@ -45,8 +45,8 @@ dynamic = ["dependencies", "optional-dependencies"]
target-version = "py38"
[tool.ruff.lint]
select = ["I", "PL"]
ignore = ["PLR2004"]
select = ["I", "PL", "UP"]
ignore = ["PLR2004", "UP028", "UP030", "UP031", "UP032"]
[tool.ruff.format]
line-ending = "lf"