Skip to content

implement no type checking flag #230

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

Merged
merged 1 commit into from
Apr 28, 2023

Conversation

juliusfrost
Copy link
Contributor

@juliusfrost juliusfrost commented Apr 27, 2023

Resolves #229

@codecov-commenter
Copy link

codecov-commenter commented Apr 27, 2023

Codecov Report

Merging #230 (a43e268) into main (da6da64) will increase coverage by 0.06%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #230      +/-   ##
==========================================
+ Coverage   85.73%   85.79%   +0.06%     
==========================================
  Files          26       26              
  Lines        2923     2936      +13     
  Branches      701      704       +3     
==========================================
+ Hits         2506     2519      +13     
  Misses        307      307              
  Partials      110      110              
Impacted Files Coverage Δ
pycardano/backend/base.py 98.63% <100.00%> (ø)
pycardano/serialization.py 86.92% <100.00%> (ø)
pycardano/transaction.py 94.09% <100.00%> (ø)
pycardano/types.py 100.00% <100.00%> (ø)

@juliusfrost juliusfrost force-pushed the feat/no-type-check branch 4 times, most recently from 815f8ef to f2d3ca0 Compare April 27, 2023 04:38
@juliusfrost
Copy link
Contributor Author

@cffls ready for your review :)

@cffls
Copy link
Collaborator

cffls commented Apr 27, 2023

Thanks @juliusfrost for creating this feature. In fact, typeguard provides a native solution for typecheck suppression. Do you think the native solution from typeguard is sufficient?

@juliusfrost
Copy link
Contributor Author

Hi @cffls, I tried your suggestion but I couldn't get it to work (it doesn't suppress subsequent calls to methods). For my use case, I need to disable it globally for my tests. I found that if you use PYTHONOPTIMIZE it does disable the checks, but also disables assertions so I can't use with my tests since they need assertions.

@cffls
Copy link
Collaborator

cffls commented Apr 28, 2023

Thanks for trying it out. Not sure why it didn't work. I will merge this PR since it is proven to be working. :D

@cffls cffls merged commit 4d8e77d into Python-Cardano:main Apr 28, 2023
@juliusfrost juliusfrost deleted the feat/no-type-check branch April 28, 2023 18:01
@juliusfrost
Copy link
Contributor Author

Thanks!

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.

Make typeguard toggleable to increase speed
3 participants