mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
more hound fixes, gitignore .idea
This commit is contained in:
parent
f7c45301da
commit
e774240ea2
3 changed files with 10 additions and 6 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -67,3 +67,8 @@ node_modules/
|
|||
package-lock.json
|
||||
|
||||
pype/premiere/ppro/js/debug.log
|
||||
|
||||
|
||||
# Idea
|
||||
######
|
||||
.idea/
|
||||
|
|
|
|||
|
|
@ -267,14 +267,14 @@ class IniSettingRegistry(ASettingRegistry):
|
|||
|
||||
def delete_item_from_section(self, section: str, name: str) -> None:
|
||||
"""Delete item from section in ini file.
|
||||
|
||||
|
||||
Args:
|
||||
section (str): Section name.
|
||||
name (str): Name of the item.
|
||||
|
||||
|
||||
Throws:
|
||||
ValueError: If item doesn't exist.
|
||||
|
||||
|
||||
"""
|
||||
self.get_item_from_section.cache_clear()
|
||||
config = configparser.ConfigParser()
|
||||
|
|
@ -285,7 +285,7 @@ class IniSettingRegistry(ASettingRegistry):
|
|||
raise ValueError(
|
||||
f"Registry doesn't contain value {section}:{name}")
|
||||
config.remove_option(section, name)
|
||||
|
||||
|
||||
# if section is empty, delete it
|
||||
if len(config[section].keys()) == 0:
|
||||
config.remove_section(section)
|
||||
|
|
@ -295,7 +295,7 @@ class IniSettingRegistry(ASettingRegistry):
|
|||
|
||||
def _delete_item(self, name):
|
||||
"""Delete item from default section.
|
||||
|
||||
|
||||
Note:
|
||||
See :meth:`~pype.lib.IniSettingsRegistry.delete_item_from_section`
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ def ini_registry(tmpdir):
|
|||
|
||||
|
||||
def test_keyring(json_registry):
|
||||
service = json_registry._name
|
||||
json_registry.set_secure_item("item1", "foo")
|
||||
json_registry.set_secure_item("item2", "bar")
|
||||
result1 = json_registry.get_secure_item("item1")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue