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

big pylint refactor #1578

Open
wants to merge 83 commits into
base: master
Choose a base branch
from

Conversation

whoburg
Copy link
Collaborator

@whoburg whoburg commented Jan 6, 2024

Alright, I bit the bullet and got the entire gpkit/ package up to date with the latest pylint (pylint 3.0.3). My goal was to reduce custom rcfile settings, use local pylint disable statements where warranted, and get the code base in line with the latest pylint with default settings.

I did identify three warnings (disabled in the current PR) that I feel warrant opening issues to address:

  • significant chuck of duplicate code in solution_array.py and in constraints/set.py
  • numerous cyclic import warnings
  • a modified-iterating-list warning in interactive/plotting.py, warning that a value parents used to control iteration in a loop is also being modified within that same loop

This PR currently handles the gpkit directory, including gpkit/tests, but does not touch docs/source/examples at all. That can be the next pylint PR.

Review definitely warranted and welcome.

@acdl-jenkins
Copy link

Can one of the admins verify this patch?

@galbramc
Copy link
Contributor

galbramc commented Jan 6, 2024

test this please

1 similar comment
@galbramc
Copy link
Contributor

galbramc commented Jan 6, 2024

test this please

@galbramc
Copy link
Contributor

galbramc commented Jan 6, 2024

Macys is running Python 3.12, where distutils has been deprecated and removed. Unfortunately mosek 9.1 used distutils. I've installed mosek 10.1 to see if that fixes it, or just creates new problems.

@galbramc
Copy link
Contributor

galbramc commented Jan 6, 2024

No dice... Mosek uses setuptools as well which is also gone in Python 3.12...

@whoburg
Copy link
Collaborator Author

whoburg commented Jan 6, 2024

Gotcha, we probably can't support python 3.12 then until mosek does as well as well.

@whoburg
Copy link
Collaborator Author

whoburg commented Jan 8, 2024

Added more commits that address docs/source/examples. On my local machine, this makes pylint.sh run without any pylint failures. Ready for review.

@galbramc
Copy link
Contributor

galbramc commented Jan 8, 2024

I'm at SciTech this week. I won't be able to fix macy's for you to use an older version of Python until some time next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants