newrelic / newrelic-python-agent

New Relic Python Agent
https://docs.newrelic.com/docs/agents/python-agent
Apache License 2.0
176 stars 99 forks source link

Use replace instead of lstrip to strip dns:// #1206

Closed hmstepanek closed 2 weeks ago

hmstepanek commented 2 weeks ago

lstrip strips all the characters from the beginning of the string so strings that begin in d, n, or s get the first character(s) stripped. Replace is actually what we want in this case.

github-actions[bot] commented 2 weeks ago

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON bandit 1 0 4.99s
✅ PYTHON black 2 0 0 0.84s
✅ PYTHON flake8 2 0 0.44s
✅ PYTHON isort 2 0 0 0.3s
✅ PYTHON pylint 2 0 2.02s

See detailed report in MegaLinter reports _Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff_

_MegaLinter is graciously provided by OX Security_

codecov-commenter commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.64%. Comparing base (41e5475) to head (ef07134).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1206 +/- ## ======================================= Coverage 81.63% 81.64% ======================================= Files 197 197 Lines 21803 21803 Branches 3807 3807 ======================================= + Hits 17799 17800 +1 + Misses 2893 2892 -1 Partials 1111 1111 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.