Skip to content

Commit 9d098a5

Browse files
committed
Bump version number
1 parent a61222a commit 9d098a5

File tree

3 files changed

+12
-18
lines changed

3 files changed

+12
-18
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ build-backend = "mesonpy"
99

1010
[project]
1111
name = "flacarray"
12-
version = "0.2.3"
12+
version = "0.2.4"
1313
description = "FLAC Compression of Arrays"
1414
readme = "README.md"
1515
maintainers = [

src/flacarray/__init__.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,8 @@
66
# setuptools build backend in pyproject.toml seems difficult...
77

88
import os
9-
import logging
109

11-
# Get the log level from the environment
12-
log_level = os.getenv("FLACARRAY_LOG_LEVEL", "INFO")
1310

14-
# Set the log level
15-
logging.basicConfig(level=log_level)
16-
17-
__version__ = "0.2.3"
11+
__version__ = "0.2.4"
1812

1913
from .array import FlacArray

src/flacarray/utils.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121

2222

2323
log = logging.getLogger()
24-
env_key = "FLACARRAY_LOGLEVEL"
25-
if env_key in os.environ:
26-
lvl = os.environ[env_key]
27-
if hasattr(logging, lvl):
28-
log.setLevel(getattr(logging, lvl))
29-
else:
30-
msg = f"Environment variable {env_key} set to invalid level '{lvl}'"
31-
raise RuntimeError(msg)
32-
else:
33-
log.setLevel(logging.INFO)
24+
log.setLevel(logging.INFO)
25+
env_keys = ["FLACARRAY_LOGLEVEL", "FLACARRAY_LOG_LEVEL"]
26+
for env_key in env_keys:
27+
if env_key in os.environ:
28+
lvl = os.environ[env_key]
29+
if hasattr(logging, lvl):
30+
log.setLevel(getattr(logging, lvl))
31+
else:
32+
msg = f"Environment variable {env_key} set to invalid level '{lvl}'"
33+
raise RuntimeError(msg)
3434

3535

3636
_use_function_timers = None

0 commit comments

Comments
 (0)