-
Notifications
You must be signed in to change notification settings - Fork 147
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
richardebeling
force-pushed
the
dependabot/pip/pylint-approx-eq-3.0.1
branch
from
October 22, 2023 17:30
f952863
to
fa4da5e
Compare
richardebeling
approved these changes
Oct 22, 2023
There was a problem hiding this 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)
niklasmohrin
approved these changes
Oct 23, 2023
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
force-pushed
the
dependabot/pip/pylint-approx-eq-3.0.1
branch
from
October 23, 2023 15:31
fa4da5e
to
aa0a7a0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 forinherit-non-class
for generic Protocols (#9108) (#...4a7ad5e
Bump pylint to 3.0.0, update changelog3cba15b
Bump actions/setup-python from 4.7.0 to 4.7.1 (#9089)83bd48f
[doc] Upgrade doc following the full implementation of pyupgrade in ruff31f40a9
[ruff conf] Simplify the ruff configuration1f3de87
[pre-commit] Remove pyupgrade and use ruff instead9c69801
Prevent stats loss (#9082)ca8690a
Merge maintenance 2.17.x into main (#9085)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)