pydantic / pydantic-extra-types

Extra Pydantic types.
MIT License
181 stars 48 forks source link

♻️ refactor the `validate_brand` method & add new types #56

Closed yezz123 closed 8 months ago

yezz123 commented 1 year ago

Selected Reviewer: @Kludex

yezz123 commented 1 year ago

please review

Kludex commented 1 year ago

Hmmm... Should we think of a more elegant way to register new brands?

yezz123 commented 1 year ago

Hmmm... Should we think of a more elegant way to register new brands?

I really tried to think about something that can be used In that case, but this is the best way to refactor it!

what do you think about make in it like external types? or create secondary package support just for types quit like pycountry

Kludex commented 1 year ago

Hmmm... Should we think of a more elegant way to register new brands?

I really tried to think about something that can be used In that case, but this is the best way to refactor it!

what do you think about make in it like external types? or create secondary package support just for types quit like pycountry

Unless there's already a package that handles it, I don't think we should create a separate one for it now. But... Doesn't a package already exist for this?

yezz123 commented 1 year ago

@Kludex what do you think shall we support this one: https://github.com/orokusaki/pycard

hirotasoshu commented 1 year ago

@Kludex what do you think shall we support this one: https://github.com/orokusaki/pycard

@yezz123 This package does not appear to be actively updated (last commit in 2017, opened pull request from 2019) and does not support all proposed card brands

codecov[bot] commented 8 months ago

Codecov Report

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

Comparison is base (5ebc5bb) 100.00% compared to head (177d866) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #56 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 10 10 Lines 688 707 +19 Branches 176 179 +3 ========================================= + Hits 688 707 +19 ```

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