Skip to content

[FIX] Multiple parameters for route_v8#84

Merged
abdullahselek merged 1 commit into
abdullahselek:masterfrom
maciej-wichowski:fix-route_v8_multiple_parameters
Oct 17, 2024
Merged

[FIX] Multiple parameters for route_v8#84
abdullahselek merged 1 commit into
abdullahselek:masterfrom
maciej-wichowski:fix-route_v8_multiple_parameters

Conversation

@maciej-wichowski

Copy link
Copy Markdown
Contributor
  1. Improve encode_parameters method, so it processes dict parameters correctly. Here API expects multi-level dict to be expressed as key[sub1]=val1&key[sub2]=val2. The method supports only one level sub-dict, which as far as I know, should be enough.
  2. Fix route_v8 - avoid, exclude and truck parameters were not fully supported.

Fixes #83

@codecov-commenter

codecov-commenter commented Oct 15, 2024

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.99%. Comparing base (a8f1b58) to head (e1e01ff).
Report is 2 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #84   +/-   ##
=======================================
  Coverage   92.98%   92.99%           
=======================================
  Files          26       26           
  Lines        1754     1755    +1     
=======================================
+ Hits         1631     1632    +1     
  Misses        123      123           
Flag Coverage Δ
unittests 92.99% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Comment thread herepy/__init__.py Outdated
__copyright__ = "Copyright (c) 2017 Abdullah Selek"
__license__ = "MIT License"
__version__ = "3.6.4"
__version__ = "3.6.5"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to bump the version as 3.6.4 is not released yet.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry! I also bumped the version in #82 ...

Comment thread herepy/utils.py Outdated
for key, value in parameters.items():
if isinstance(value, dict):
for key2, val2 in value.items():
res[f"{key}[{key2}]"] = val2

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format the code, I can see an extra space before val2. And also use better variable names for key2 and val2.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks.

@maciej-wichowski
maciej-wichowski force-pushed the fix-route_v8_multiple_parameters branch from eaeca38 to 918b954 Compare October 16, 2024 08:03
@maciej-wichowski
maciej-wichowski force-pushed the fix-route_v8_multiple_parameters branch from 918b954 to e1e01ff Compare October 16, 2024 08:08

@abdullahselek abdullahselek left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes! Looks good to me.

@abdullahselek
abdullahselek merged commit a9a623f into abdullahselek:master Oct 17, 2024
@maciej-wichowski
maciej-wichowski deleted the fix-route_v8_multiple_parameters branch October 18, 2024 21:38
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.

In RoutingAPI.route_v8, some parameters are ignored.

3 participants