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
2 changes: 1 addition & 1 deletion ops/pebble.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
'IdentityDict',
{
# NOTE: ensure <IdentityAccessLiterals> are kept up to date in all locations
'access': Literal['untrusted', 'metrics', 'read', 'admin'],
'access': "IdentityAccess | Literal['untrusted', 'metrics', 'read', 'admin']",
'local': 'NotRequired[LocalIdentityDict]',
'basic': 'NotRequired[BasicIdentityDict]',
},
Expand Down
4 changes: 2 additions & 2 deletions test/test_pebble.py
Original file line number Diff line number Diff line change
Expand Up @@ -4305,7 +4305,7 @@ def test_local_identity_from_dict(self):

def test_local_identity_from_dict_with_access_enum(self):
identity = pebble.Identity.from_dict({
'access': pebble.IdentityAccess.ADMIN, # type: ignore
'access': pebble.IdentityAccess.ADMIN,
'local': {'user-id': 42},
})
assert identity == pebble.Identity(
Expand All @@ -4330,7 +4330,7 @@ def test_basic_identity_from_dict(self):

def test_basic_identity_from_dict_with_access_enum(self):
identity = pebble.Identity.from_dict({
'access': pebble.IdentityAccess.METRICS, # type: ignore
'access': pebble.IdentityAccess.METRICS,
'basic': {'password': 'hashed password'},
})
assert identity == pebble.Identity(
Expand Down
Loading