Skip to content

Commit 36ff865

Browse files
committed
remove unused code
1 parent 97e0442 commit 36ff865

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

onvif/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def __init__(self, user, passw, dt_diff=None, **kwargs):
8383
def apply(self, envelope, headers):
8484
old_created = self.created
8585
if self.created is None:
86-
self.created = dt.datetime.now(tz=dt.UTC).replace(tzinfo=None)
86+
self.created = dt.datetime.now(tz=dt.timezone.utc).replace(tzinfo=None)
8787
if self.dt_diff is not None:
8888
self.created += self.dt_diff
8989
result = super().apply(envelope, headers)

onvif/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from multidict import CIMultiDict
1616
from yarl import URL
1717

18-
utcnow: partial[dt.datetime] = partial(dt.datetime.now, dt.UTC)
18+
utcnow: partial[dt.datetime] = partial(dt.datetime.now, dt.timezone.utc)
1919

2020
# This does blocking I/O (stat) so we cache the result
2121
# to minimize the impact of the blocking I/O.

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ log_level="NOTSET"
55
plugins = ["covdefaults"]
66

77

8+
[tool.ruff]
9+
target-version = "py310"
10+
811
[build-system]
912
requires = ['setuptools>=65.4.1', 'wheel']

0 commit comments

Comments
 (0)