Skip to content

Commit

Permalink
fix flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jreadey committed Dec 26, 2024
1 parent 9018f6d commit 0699a08
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions h5pyd/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Config:
"""
User Config state
"""
_cfg = {} # global state
_cfg = {} # global state

def __init__(self, config_file=None, **kwargs):
if Config._cfg:
Expand Down Expand Up @@ -109,31 +109,31 @@ def __repr__(self):

def keys(self):
return Config._cfg.keys()

@property
def hs_endpoint(self):
return Config._cfg.get("hs_endpoint")

@property
def hs_username(self):
return Config._cfg.get("hs_username")

@property
def hs_password(self):
return Config._cfg.get("hs_password")

@property
def hs_api_key(self):
return Config._cfg.get("hs_api_key")

@property
def bool_names(self):
if "bool_names" in Config._cfg:
names = Config._cfg["bool_names"]
else:
names = (b"FALSE", b"TRUE")
return names

@bool_names.setter
def bool_names(self, value):
if isinstance(value, str):
Expand All @@ -149,15 +149,15 @@ def bool_names(self, value):
else:
names = value
Config._cfg["bool_names"] = tuple(names)

@property
def complex_names(self):
if "complex_names" in Config._cfg:
names = Config._cfg["complex_names"]
else:
names = ("r", "i")
return names

@complex_names.setter
def complex_names(self, value):
if isinstance(value, str):
Expand All @@ -182,7 +182,7 @@ def track_order(self):
else:
track = False
return track

@track_order.setter
def track_order(self, value):
if isinstance(value, str):
Expand All @@ -194,7 +194,7 @@ def track_order(self, value):
else:
track = bool(value)
Config._cfg["track_order"] = track


def get_config(config_file=None, **kwargs):
return Config(config_file=config_file, **kwargs)

0 comments on commit 0699a08

Please sign in to comment.