Skip to content

Minor cleanup of the code handling UrlsafeTokenField's factory argument#607

Merged
foarsitter merged 2 commits intojazzband:masterfrom
ProtixIT:cleanup-factory
Apr 3, 2024
Merged

Minor cleanup of the code handling UrlsafeTokenField's factory argument#607
foarsitter merged 2 commits intojazzband:masterfrom
ProtixIT:cleanup-factory

Conversation

@mthuurne
Copy link
Contributor

The use of isinstance(factory, Callable) is avoided, because it triggers a long standing bug in mypy.

Additionally, a wrong word in an error message was fixed.

This should have no impact on users of the library.

This is slightly more compact, but the main motivation is to work
around the following mypy bug:

python/mypy#3060
@codecov
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.57%. Comparing base (994d6c1) to head (6c5ed66).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #607      +/-   ##
==========================================
- Coverage   98.57%   98.57%   -0.01%     
==========================================
  Files           6        6              
  Lines         773      772       -1     
==========================================
- Hits          762      761       -1     
  Misses         11       11              

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

@mthuurne mthuurne mentioned this pull request Mar 26, 2024
@foarsitter foarsitter added this to the 5.0.0 milestone Apr 3, 2024
@foarsitter foarsitter merged commit 89653b2 into jazzband:master Apr 3, 2024
@mthuurne mthuurne deleted the cleanup-factory branch April 4, 2024 17:36
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.

2 participants