Skip to content

Commit

Permalink
fix(config): removed interpolation
Browse files Browse the repository at this point in the history
Removed interpolation as it was causing issues with percent symbols in
passwords.
  • Loading branch information
ddkasa committed Oct 7, 2024
1 parent b914f1d commit afe515f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_use_togglrc(tmp_path, faker):
file_path = tmp_path / ".togglrc"
file_path.touch()

config = ConfigParser()
config = ConfigParser(interpolation=None)
config.write(file_path)

with pytest.raises(AuthenticationError):
Expand Down
2 changes: 1 addition & 1 deletion toggl_api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def use_togglrc(config_path: Optional[Path] = None) -> BasicAuth:
msg = f"Config file not found: {config_path}"
raise AuthenticationError(msg)

config = configparser.ConfigParser()
config = configparser.ConfigParser(interpolation=None)
config.read(config_path, encoding="utf-8")

if not config.has_section("auth"):
Expand Down

0 comments on commit afe515f

Please sign in to comment.