Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
jobs:
build:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/winregistry
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Extract version from tag
Expand All @@ -21,4 +26,4 @@
- run: uv python install 3.12
- run: uv sync --all-extras --dev
- run: uv build
- run: uv publish --username __token__ --password ${{ secrets.PYPI_PASS }}
- run: uv publish --trusted-publishing always
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# WinRegistry

[![PyPI](https://img.shields.io/pypi/v/winregistry.svg)](https://pypi.python.org/pypi/winregistry)
[![PyPI](https://img.shields.io/pypi/dm/winregistry.svg)](https://pypi.python.org/pypi/winregistry)
[![PyPI version](https://img.shields.io/pypi/v/winregistry.svg)](https://pypi.org/project/winregistry/)
[![PyPI downloads](https://img.shields.io/pypi/dm/winregistry.svg)](https://pypi.org/project/winregistry/)
[![Python versions](https://img.shields.io/pypi/pyversions/winregistry.svg)](https://pypi.org/project/winregistry/)
[![License](https://img.shields.io/pypi/l/winregistry.svg)](https://github.com/shpaker/winregistry/blob/main/LICENSE)

A Python library for interacting with the Windows registry.

Expand Down
6 changes: 4 additions & 2 deletions winregistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,8 @@ def registry_key_should_not_exist(
cls.registry_key_should_exist(key_name)
except FileNotFoundError:
return
raise FileExistsError
msg = f"Registry key exists but should not: {key_name!r}"
raise AssertionError(msg)

@staticmethod
def registry_value_should_exist(
Expand Down Expand Up @@ -951,7 +952,8 @@ def registry_value_should_not_exist(
cls.registry_value_should_exist(key_name, value_name)
except FileNotFoundError:
return
raise FileExistsError
msg = f"Registry value exists but should not: key={key_name!r}, value={value_name!r}"
raise AssertionError(msg)

@staticmethod
def create_registry_key(
Expand Down
Loading