mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 15:21:13 +02:00
refactor: ruff autofixes
This commit is contained in:
39 files changed
+76
-88
No files matched your search
@@ -15,7 +15,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from datetime import datetime, timezone
|
||||
from datetime import UTC, datetime
|
||||
from typing import Optional
|
||||
from uuid import UUID
|
||||
|
||||
@@ -54,5 +54,5 @@ class Snapshot(SnapshotBase):
|
||||
@classmethod
|
||||
def _derive_created(cls, data):
|
||||
if isinstance(data, dict) and "created" not in data and data.get("created_at") is not None:
|
||||
data = {**data, "created": datetime.fromtimestamp(data["created_at"], tz=timezone.utc)}
|
||||
data = {**data, "created": datetime.fromtimestamp(data["created_at"], tz=UTC)}
|
||||
return data
|
||||
Reference in new issue
Block a user