Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pylint-django
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian Python Team
packages
pylint-django
Commits
f2ac9bb8
Commit
f2ac9bb8
authored
2 years ago
by
Nilesh Patra
Browse files
Options
Downloads
Patches
Plain Diff
Add patch to fix FTBFS with new pylint (Closes: #1021889)
parent
9585a4ee
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/fix-pylint.patch
+25
-0
25 additions, 0 deletions
debian/patches/fix-pylint.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
26 additions
and
0 deletions
debian/patches/fix-pylint.patch
0 → 100644
+
25
−
0
View file @
f2ac9bb8
Description: pylint >=2.13 has changed args in ScopeConsumer, fixing it accordingly
Author: Nilesh Patra <nilesh@debian.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021889
Forwarded: not-needed, aleady fixed upstream
Last-Update: 2022-10-16
--- a/pylint_django/augmentations/__init__.py
+++ b/pylint_django/augmentations/__init__.py
@@ -314,7 +314,16 @@
continue
new_things[name] = stmts
- consumer._atomic = ScopeConsumer(new_things, consumer.consumed, consumer.scope_type) # pylint: disable=W0212
+ # ScopeConsumer changed between pylint 2.12 and 2.13
+ # see https://github.com/PyCQA/pylint/issues/5970#issuecomment-1078778393
+ if hasattr(consumer, "consumed_uncertain"):
+ # this is pylint >= 2.13, and the ScopeConsumer tuple has an additional field
+ sc_args = (new_things, consumer.consumed, consumer.consumed_uncertain, consumer.scope_type)
+ else:
+ # this is <2.13 and does not have the consumer_uncertain field
+ sc_args = (new_things, consumer.consumed, consumer.scope_type)
+
+ consumer._atomic = ScopeConsumer(*sc_args) # pylint: disable=W0212
self._to_consume = [consumer] # pylint: disable=W0212
return orig_method(self, node)
This diff is collapsed.
Click to expand it.
debian/patches/series
0 → 100644
+
1
−
0
View file @
f2ac9bb8
fix-pylint.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment