Skip to content

Commit 7807adc

Browse files
Merge pull request #28 from BrunoSilvaAndrade/release/3.1.2
fix: Make Config inherit from collections.abc.Mapping
2 parents b737cbe + 6c06954 commit 7807adc

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
27+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2828

2929
steps:
3030
- uses: actions/checkout@v3

pyconfigparser.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import yaml
66
import os
77
import re
8+
from collections.abc import Mapping
89

910
__all__ = [
1011
"ConfigError",
@@ -106,7 +107,7 @@ def _extract_env_variable_key(variable):
106107
}
107108

108109

109-
class Config:
110+
class Config(Mapping):
110111

111112
def __getitem__(self, item):
112113
return self.__dict__[item]
@@ -117,12 +118,6 @@ def __iter__(self):
117118
def __len__(self):
118119
return len(self.__dict__)
119120

120-
def keys(self):
121-
return self.__dict__.keys()
122-
123-
def values(self):
124-
return self.__dict__.values()
125-
126121

127122
class ConfigParser:
128123
def __init__(self):

0 commit comments

Comments
 (0)