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

Fix lint errors with toolchain 1.83 #1561

Merged
merged 1 commit into from
Dec 2, 2024
Merged

Conversation

changhc
Copy link
Contributor

@changhc changhc commented Nov 30, 2024

Change Summary

Fixes lint errors that came up with the new stable toolchain version 1.83. Simply followed the tools' suggestions. Specifically for clippy::used_underscore_items though,

  • for _invalid_as_json_key, I removed the prefix underscore because that was rather simple and there was no conflict in naming.
  • for others, I applied #[allow(clippy::used_underscore_items)] to suppress the warning because there would be a collision and I cannot really decide on naming. Perhaps someone can revisit that later on.

Same for clippy::type_complexity in src/serializers/shared.rs.

Related issue number

Fixes #1560.

Checklist

  • Unit tests for the changes exist
  • Documentation reflects the changes where applicable
  • Pydantic tests pass with this pydantic-core (except for expected changes)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Copy link

codecov bot commented Nov 30, 2024

Codecov Report

Attention: Patch coverage is 57.69231% with 11 lines in your changes missing coverage. Please review.

Project coverage is 89.63%. Comparing base (ab503cb) to head (c253d6d).
Report is 241 commits behind head on main.

Files with missing lines Patch % Lines
src/validators/with_default.rs 40.00% 3 Missing ⚠️
src/serializers/fields.rs 0.00% 1 Missing ⚠️
src/serializers/shared.rs 0.00% 1 Missing ⚠️
src/serializers/type_serializers/complex.rs 0.00% 1 Missing ⚠️
src/serializers/type_serializers/dict.rs 0.00% 1 Missing ⚠️
src/serializers/type_serializers/generator.rs 0.00% 1 Missing ⚠️
src/serializers/type_serializers/list.rs 0.00% 1 Missing ⚠️
src/serializers/type_serializers/set_frozenset.rs 0.00% 1 Missing ⚠️
src/serializers/type_serializers/union.rs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1561      +/-   ##
==========================================
- Coverage   90.21%   89.63%   -0.59%     
==========================================
  Files         106      112       +6     
  Lines       16339    17889    +1550     
  Branches       36       40       +4     
==========================================
+ Hits        14740    16034    +1294     
- Misses       1592     1835     +243     
- Partials        7       20      +13     
Files with missing lines Coverage Δ
src/errors/validation_exception.rs 93.27% <ø> (+0.39%) ⬆️
src/input/datetime.rs 94.69% <ø> (-4.08%) ⬇️
src/input/input_abstract.rs 39.53% <ø> (-30.71%) ⬇️
src/input/input_json.rs 91.36% <ø> (+2.43%) ⬆️
src/input/input_python.rs 98.05% <ø> (+0.84%) ⬆️
src/input/input_string.rs 52.68% <ø> (+14.45%) ⬆️
src/input/return_enums.rs 86.18% <ø> (+0.46%) ⬆️
src/serializers/computed_fields.rs 97.84% <ø> (+0.16%) ⬆️
src/serializers/infer.rs 94.15% <ø> (-0.97%) ⬇️
src/serializers/ser.rs 25.27% <ø> (+0.27%) ⬆️
... and 13 more

... and 41 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c96bec...c253d6d. Read the comment docs.

Copy link

codspeed-hq bot commented Nov 30, 2024

CodSpeed Performance Report

Merging #1561 will not alter performance

Comparing changhc:lint-1.83 (c253d6d) with main (5c96bec)

Summary

✅ 155 untouched benchmarks

Copy link
Contributor

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks, all LGTM 👍

@davidhewitt davidhewitt marked this pull request as ready for review December 2, 2024 11:09
@davidhewitt davidhewitt merged commit 298e4ea into pydantic:main Dec 2, 2024
29 checks passed
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.

Lint error with toolchain version 1.83
2 participants