Skip to content

Some pylint and pyupgrade cleanups #29

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 17 commits into from
Nov 29, 2022
Merged

Conversation

Armavica
Copy link
Member

@Armavica Armavica commented Nov 23, 2022

I first applied pyupgrade --py3-plus, then --py36-plus which introduced f-strings, then --py37-plus (the current oldest alive Python version) which didn't have any new changes.

Note that none of these cleanups should change the semantics of the code except this one which was probably a bug but I would be glad if somebody could confirm.

Here are a few important guidelines and requirements to check before your PR can be merged:

  • There is an informative high-level description of the changes.
  • The description and/or commit message(s) references the relevant GitHub issue(s).
  • pre-commit is installed and set up.
  • The commit messages follow these guidelines.
  • The commits correspond to relevant logical changes, and there are no commits that fix changes introduced by other commits in the same branch/BR.
  • There are tests covering the changes introduced in the PR.

Don't worry, your PR doesn't need to be in perfect order to submit it. As development progresses and/or reviewers request changes, you can always rewrite the history of your feature/PR branches.

If your PR is an ongoing effort and you would like to involve us in the process, simply make it a draft PR.

@ferrine
Copy link
Member

ferrine commented Nov 24, 2022

this one
is not a bug but a valid statement, this is fine

@michaelosthege
Copy link
Member

this one is not a bug but a valid statement, this is fine

I think the diff you linked is a perfectly fine - the before and after are equivalent

For the failing test @Armavica could try a git bisect? Assuming that you are on an OS where JAX is supported..

@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2022

Codecov Report

Merging #29 (cf61c73) into main (1b76af3) will not change coverage.
The diff coverage is 73.77%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #29   +/-   ##
=======================================
  Coverage   74.22%   74.22%           
=======================================
  Files         174      174           
  Lines       48734    48734           
  Branches    10367    10367           
=======================================
  Hits        36175    36175           
  Misses      10272    10272           
  Partials     2287     2287           
Impacted Files Coverage Δ
pytensor/compile/debugmode.py 60.45% <0.00%> (ø)
pytensor/compile/function/pfunc.py 84.18% <ø> (ø)
pytensor/compile/nanguardmode.py 62.37% <ø> (ø)
pytensor/compile/profiling.py 74.55% <ø> (ø)
pytensor/compile/sharedvalue.py 93.75% <ø> (ø)
pytensor/configdefaults.py 66.20% <ø> (ø)
pytensor/configparser.py 84.94% <ø> (ø)
pytensor/gradient.py 77.02% <ø> (ø)
pytensor/graph/basic.py 87.66% <ø> (ø)
pytensor/graph/features.py 64.69% <ø> (ø)
... and 45 more

@ricardoV94
Copy link
Member

We can merge after the conflicts are sorted out

@twiecki
Copy link
Member

twiecki commented Nov 27, 2022

Note that merging this will make downstreaming PRs quite a bit harder.

@michaelosthege
Copy link
Member

Note that merging this will make downstreaming PRs quite a bit harder.

It's a relatively small fraction of the codebase that's changing, and most of it are removals of " ".
If it indeed turns out to be annoying, we might consider an upstream contribution.

@ricardoV94 ricardoV94 merged commit 491f93e into pymc-devs:main Nov 29, 2022
@michaelosthege
Copy link
Member

hehe, I was literally seconds away from checking out and rebasing this branch when @ricardoV94 merged it 😄

Nice work everybody!

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.

6 participants