Skip to content

Commit

Permalink
fix: better url sanitize
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Jul 27, 2023
1 parent df9e37e commit f82dcec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[release]
pip install -e .[release]
- name: Build
run: python setup.py sdist bdist_wheel
Expand Down
5 changes: 4 additions & 1 deletion src/ape_geth/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@ def geth_config(self) -> GethConfig:

@property
def _clean_uri(self) -> str:
return str(URL(self.uri).with_user(None).with_password(None))
url = URL(self.uri).with_user(None).with_password(None)
# If there is a path, hide it but show that you are hiding it.
# Use string interpolation to prevent URL-character encoding.
return f"{url.with_path('')}/[hidden]" if url.path else f"{url}"

@property
def ipc_path(self) -> Path:
Expand Down

0 comments on commit f82dcec

Please sign in to comment.