Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
A.Shpak committed Nov 14, 2024
1 parent e9688bc commit 14b6cf4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
11 changes: 4 additions & 7 deletions Justfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
SOURCE_DIR := "winregistry"

tests: pytest
fmt: black isort

isort:
poetry run isort {{ SOURCE_DIR }} --diff
# poetry run isort test_curlify3.py --diff
poetry run isort winregistry.py

black:
poetry run isort {{ SOURCE_DIR }}
poetry run black winregistry.py
# poetry run isort test_curlify3.py

pytest:
poetry run pytest -vv

ruff:
poetry run ruff check --fix {{SOURCE_DIR}}
poetry run ruff check --fix winregistry.py

mypy:
poetry run mypy --pretty -p {{SOURCE_DIR}}
poetry run mypy --pretty winregistry.py
6 changes: 1 addition & 5 deletions winregistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import typing as tp
import winreg

from abc import ABC, abstractmethod
from collections import namedtuple
from datetime import datetime, timedelta
Expand Down Expand Up @@ -141,7 +142,6 @@ def from_index(
wow_64_32=wow_64_32,
)

#

@property
def child_keys_count(
Expand All @@ -161,7 +161,6 @@ def modified_at(
) -> datetime:
return datetime(1601, 1, 1) + timedelta(microseconds=self._raw_info.modified_at / 10)

#

@property
def child_keys_names(
Expand All @@ -184,7 +183,6 @@ def values(
for index in range(0, self.values_count):
yield Value.from_index(self._key_obj, index)

#

def open_subkey(
self,
Expand Down Expand Up @@ -232,7 +230,6 @@ def delete_subkey(

self._auto_refresh()

#

def read_value(
self,
Expand All @@ -256,7 +253,6 @@ def unset_value(
winreg.DeleteValue(self._key_obj, name)
self._auto_refresh()

#

def close(
self,
Expand Down

0 comments on commit 14b6cf4

Please sign in to comment.