mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-133158: Adjust c-analyzer max_sizes for typeobject.c (GH-133159)
This also improves the error message for when a file is too large.
This commit is contained in:
parent
0a0cbd43a7
commit
33f89106d7
3 changed files with 33 additions and 5 deletions
|
|
@ -123,10 +123,16 @@ def resolve(self, kind, data, name, parent=None):
|
|||
def done(self):
|
||||
self._set_ready()
|
||||
|
||||
def too_much_text(self, maxtext):
|
||||
return maxtext and len(self.text) > maxtext
|
||||
|
||||
def too_many_lines(self, maxlines):
|
||||
return maxlines and self.end - self.start > maxlines
|
||||
|
||||
def too_much(self, maxtext, maxlines):
|
||||
if maxtext and len(self.text) > maxtext:
|
||||
if self.too_much_text(maxtext):
|
||||
pass
|
||||
elif maxlines and self.end - self.start > maxlines:
|
||||
elif self.too_many_lines(maxlines):
|
||||
pass
|
||||
else:
|
||||
return False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue