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 E721: do not compare types, for exact checks use is / is not #596

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

maresb
Copy link
Contributor

@maresb maresb commented Jan 15, 2024

Description

This splits out a controvertial part of #581 code cleanup. See #581 (comment).

This runs a risk of breaking something extremely subtle, so I think we will not want to merge this, but I wanted to at least give this its own PR number for reference.

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2024

Codecov Report

Attention: Patch coverage is 84.61538% with 4 lines in your changes missing coverage. Please review.

Project coverage is 80.83%. Comparing base (4b6a444) to head (e4d207b).
Report is 170 commits behind head on main.

Files with missing lines Patch % Lines
pytensor/graph/null_type.py 0.00% 1 Missing ⚠️
pytensor/raise_op.py 50.00% 1 Missing ⚠️
pytensor/scalar/basic.py 50.00% 1 Missing ⚠️
pytensor/tensor/rewriting/math.py 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #596   +/-   ##
=======================================
  Coverage   80.83%   80.83%           
=======================================
  Files         163      163           
  Lines       46897    46897           
  Branches    11468    11468           
=======================================
  Hits        37910    37910           
  Misses       6774     6774           
  Partials     2213     2213           
Files with missing lines Coverage Δ
pytensor/compile/debugmode.py 61.33% <100.00%> (ø)
pytensor/compile/ops.py 83.57% <100.00%> (ø)
pytensor/graph/basic.py 88.61% <ø> (ø)
pytensor/graph/rewriting/unify.py 99.33% <100.00%> (ø)
pytensor/ifelse.py 51.70% <100.00%> (ø)
pytensor/link/c/params_type.py 80.41% <ø> (ø)
pytensor/link/c/type.py 75.98% <ø> (ø)
pytensor/scalar/math.py 87.34% <100.00%> (ø)
pytensor/scan/op.py 84.71% <100.00%> (ø)
pytensor/sparse/basic.py 82.53% <ø> (ø)
... and 9 more

@maresb maresb mentioned this pull request Jan 15, 2024
11 tasks
@maresb maresb closed this Jan 16, 2024
@maresb maresb reopened this Jan 16, 2024
@maresb maresb closed this Jan 20, 2024
@maresb maresb reopened this Jan 20, 2024
@maresb maresb mentioned this pull request Jan 20, 2024
@ricardoV94
Copy link
Member

ricardoV94 commented Jun 6, 2024

I think we can go ahead with this one @maresb

Can you rebase?

@maresb
Copy link
Contributor Author

maresb commented Jun 6, 2024

@ricardoV94, rebase is complete.

@ricardoV94
Copy link
Member

@maresb were we suppressing this pre-commit rule, should we reactivate it?

@maresb
Copy link
Contributor Author

maresb commented Jun 6, 2024

@maresb were we suppressing this pre-commit rule, should we reactivate it?

No we weren't, it's just totally broken in Ruff: astral-sh/ruff#6465

But now E721 passes with flake8

@ricardoV94 ricardoV94 merged commit 1935809 into pymc-devs:main Jun 6, 2024
55 of 56 checks passed
@maresb maresb deleted the E721 branch June 6, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants