Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor/remove_inflection_dep #17

Merged
merged 2 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 6 additions & 6 deletions mycroft/configuration/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

import inflection
import json
from os.path import exists, isfile, join
import re
from os.path import isfile

from requests import RequestException
import xdg.BaseDirectory
from requests import RequestException

from mycroft.configuration.locations import *
from mycroft.configuration.ovos import is_using_xdg
from mycroft.util import camel_case_split
from mycroft.util.json_helper import load_commented_json, merge_dict
from mycroft.util.log import LOG

Expand Down Expand Up @@ -51,7 +50,8 @@ def translate_remote(config, setting):
if k not in IGNORED_SETTINGS:
# Translate the CamelCase values stored remotely into the
# Python-style names used within mycroft-core.
key = inflection.underscore(re.sub(r"Setting(s)?", "", k))
key = re.sub(r"Setting(s)?", "", k)
key = camel_case_split(key).replace(" ", "_").lower()
if isinstance(v, dict):
config[key] = config.get(key, {})
translate_remote(config[key], v)
Expand Down Expand Up @@ -239,7 +239,7 @@ def load_config_stack(configs=None, cache=False, remote=True):
configs = [LocalConf(DEFAULT_CONFIG),
LocalConf(SYSTEM_CONFIG)]
if remote:
configs.append(RemoteConf())
configs.append(RemoteConf())

if is_using_xdg():
# deprecation warning
Expand Down
1 change: 0 additions & 1 deletion requirements/extra-mycroft.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ requests-futures==0.9.5
pyserial==3.0
psutil==5.6.6
pocketsphinx==0.1.0
inflection==0.3.1
pillow==8.2.0
python-dateutil==2.6.0
fasteners==0.14.1
Expand Down
1 change: 0 additions & 1 deletion requirements/minimal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pyee~=8.1.0
mock_msm~=0.9.2
pyxdg~=0.26
mycroft-messagebus-client~=0.9.1,!=0.9.2,!=0.9.3
inflection~=0.3.1
psutil~=5.6.6
fasteners~=0.14.1
requests-futures ~= 0.9.5
Expand Down
1 change: 0 additions & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ requests-futures~=0.9.5
pyserial~=3.0
psutil~=5.6.6
pocketsphinx~=0.1.0
inflection~=0.3.1
pillow~=8.2.0
python-dateutil~=2.6.0
fasteners~=0.14.1
Expand Down