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

handle functools.partial parameters in error messages #91

Closed

Conversation

grusin-db
Copy link
Contributor

@grusin-db grusin-db commented Apr 2, 2024

When partial methods are used, the error messages don't give any information which function invocation cased a problem.

This PR resolves it by adding optional info (args and/or kwargs) in the error message. Existing non-partial function error messages are not changed in any way.

black dependency was added, otherwise make lint was erroring out for me. (make dev did not pull it in for some reason)

I have ran make fmt, make lint, make test. All green!

@grusin-db grusin-db requested a review from nfx as a code owner April 2, 2024 15:32
@CLAassistant
Copy link

CLAassistant commented Apr 2, 2024

CLA assistant check
All committers have signed the CLA.

pyproject.toml Outdated Show resolved Hide resolved
src/databricks/labs/blueprint/parallel.py Outdated Show resolved Hide resolved
src/databricks/labs/blueprint/parallel.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 88.23529% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 78.54%. Comparing base (bf5b3a2) to head (c26079f).
Report is 1 commits behind head on main.

Files Patch % Lines
src/databricks/labs/blueprint/parallel.py 88.23% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #91      +/-   ##
==========================================
+ Coverage   78.45%   78.54%   +0.08%     
==========================================
  Files          14       14              
  Lines        1453     1468      +15     
  Branches      257      261       +4     
==========================================
+ Hits         1140     1153      +13     
- Misses        226      228       +2     
  Partials       87       87              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/databricks/labs/blueprint/parallel.py Outdated Show resolved Hide resolved
src/databricks/labs/blueprint/parallel.py Outdated Show resolved Hide resolved
src/databricks/labs/blueprint/parallel.py Outdated Show resolved Hide resolved
tests/unit/test_parallel.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants