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

Update pylint requirement from ~=2.17.1 to ~=3.0.1 #2029

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 9, 2023

Updates the requirements on pylint to permit the latest version.

Commits
  • f2cded4 Bump pylint to 3.0.1, update changelog (#9119)
  • a1443ed Fix a crash for Enum class decorated with dataclass (#9104) (#9112)
  • 2d8a894 Fix false positive for inherit-non-class for generic Protocols (#9108) (#...
  • 4a7ad5e Bump pylint to 3.0.0, update changelog
  • 3cba15b Bump actions/setup-python from 4.7.0 to 4.7.1 (#9089)
  • 83bd48f [doc] Upgrade doc following the full implementation of pyupgrade in ruff
  • 31f40a9 [ruff conf] Simplify the ruff configuration
  • 1f3de87 [pre-commit] Remove pyupgrade and use ruff instead
  • 9c69801 Prevent stats loss (#9082)
  • ca8690a Merge maintenance 2.17.x into main (#9085)
  • Additional commits viewable in compare view

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added the [T] Dependencies Used by Dependabot label Oct 9, 2023
@richardebeling richardebeling force-pushed the dependabot/pip/pylint-approx-eq-3.0.1 branch from f952863 to fa4da5e Compare October 22, 2023 17:30
Copy link
Member

@richardebeling richardebeling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niklasmohrin pylint 3 added two new rules that I think make the code a bit less expressive if always followed. I disabled them. When enabled, they produce this output:

(venv) evap@ubuntu-jammy:/opt/evap$ ./manage.py lint                                                                                                                                           
************* Module evap.evaluation.models                                                                                                                                                    
evap/evaluation/models.py:87:11: C1805: "self.evaluations.count() == 0" can be simplified to "not self.evaluations.count()", if it is strictly an int, as 0 is falsey (use-implicit-booleaness-not-comparison-to-zero)
evap/evaluation/models.py:624:50: C1805: "self.num_voters == 0" can be simplified to "not self.num_voters", if it is strictly an int, as 0 is falsey (use-implicit-booleaness-not-comparison-to-zero)
evap/evaluation/models.py:903:11: C1805: "self.num_textanswers == 0" can be simplified to "not self.num_textanswers", if it is strictly an int, as 0 is falsey (use-implicit-booleaness-not-comparison-to-zero)
evap/evaluation/models.py:1600:19: C1804: "getattr(instance, field_name) == ''" can be simplified to "not getattr(instance, field_name)", if it is striclty a string, as an empty string is falsey (use-implicit-booleaness-not-comparison-to-string)
************* Module evap.evaluation.migrations.0041_populate_semester_is_archived
evap/evaluation/migrations/0041_populate_semester_is_archived.py:12:7: C1805: "semester.course_set.count() == 0" can be simplified to "not semester.course_set.count()", if it is strictly an int, as 0 is falsey (use-implicit-booleaness-not-comparison-to-zero)
************* Module evap.staff.forms
evap/staff/forms.py:444:11: C1805: "weight == 0" can be simplified to "not weight", if it is strictly an int, as 0 is falsey (use-implicit-booleaness-not-comparison-to-zero)
evap/staff/forms.py:824:15: C1804: "contributor == ''" can be simplified to "not contributor", if it is striclty a string, as an empty string is falsey (use-implicit-booleaness-not-comparison-to-string)
************* Module evap.staff.importers.user
evap/staff/importers/user.py:113:11: C1804: "user_data.email == ''" can be simplified to "not user_data.email", if it is striclty a string, as an empty string is falsey (use-implicit-booleaness-not-comparison-to-string)
evap/staff/importers/user.py:119:11: C1804: "user_data.first_name == ''" can be simplified to "not user_data.first_name", if it is striclty a string, as an empty string is falsey (use-implicit-booleaness-not-comparison-to-string)
evap/staff/importers/user.py:125:11: C1804: "user_data.last_name == ''" can be simplified to "not user_data.last_name", if it is striclty a string, as an empty string is falsey (use-implicit-booleaness-not-comparison-to-string)
evap/staff/importers/user.py:143:11: C1804: "user_data.email == ''" can be simplified to "not user_data.email", if it is striclty a string, as an empty string is falsey (use-implicit-booleaness-not-comparison-to-string)
evap/staff/importers/user.py:262:11: C1804: "user_data.email == ''" can be simplified to "not user_data.email", if it is striclty a string, as an empty string is falsey (use-implicit-booleaness-not-comparison-to-string)
************* Module evap.staff.importers.enrollment
evap/staff/importers/enrollment.py:622:11: C1804: "row.student_data.email == ''" can be simplified to "not row.student_data.email", if it is striclty a string, as an empty string is falsey (use-implicit-booleaness-not-comparison-to-string)
evap/staff/importers/enrollment.py:654:11: C1804: "row.student_data.email == ''" can be simplified to "not row.student_data.email", if it is striclty a string, as an empty string is falsey (use-implicit-booleaness-not-comparison-to-string)
************* Module evap.results.exporters
evap/results/exporters.py:132:27: C1805: "sum(question_result.counts) == 0" can be simplified to "not sum(question_result.counts)", if it is strictly an int, as 0 is falsey (use-implicit-booleaness-not-comparison-to-zero)
************* Module evap.results.tools
evap/results/tools.py:89:41: C1805: "count != 0" can be simplified to "count", if it is strictly an int, as 0 is falsey (use-implicit-booleaness-not-comparison-to-zero)
evap/results/tools.py:266:7: C1805: "distribution_sum == 0" can be simplified to "not distribution_sum", if it is strictly an int, as 0 is falsey (use-implicit-booleaness-not-comparison-to-zero)

-------------------------------------------------------------------
Your code has been rated at 9.99/10 (previous run: 10.00/10, -0.01)

dependabot bot and others added 2 commits October 23, 2023 17:31
Updates the requirements on [pylint](https://github.com/pylint-dev/pylint) to permit the latest version.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](pylint-dev/pylint@v2.17.1...v3.0.1)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
@richardebeling richardebeling force-pushed the dependabot/pip/pylint-approx-eq-3.0.1 branch from fa4da5e to aa0a7a0 Compare October 23, 2023 15:31
@richardebeling richardebeling merged commit 354e54e into main Oct 23, 2023
9 checks passed
@richardebeling richardebeling deleted the dependabot/pip/pylint-approx-eq-3.0.1 branch October 23, 2023 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[T] Dependencies Used by Dependabot
Development

Successfully merging this pull request may close these issues.

2 participants