Skip to content

Commit de2e865

Browse files
committed
Fix some errors
1 parent 9cc61d9 commit de2e865

6 files changed

Lines changed: 18 additions & 31 deletions

File tree

stubs/WTForms/@tests/stubtest_allowlist.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ wtforms.fields.core.Field.__get__
99
# to let mypy know that arbitrary attribute access is possible
1010
wtforms.meta.DefaultMeta.__getattr__
1111

12+
# Should allow setting and deleting any attribute
13+
wtforms.Flags.__delattr__
14+
wtforms.Flags.__setattr__
15+
wtforms.fields.Flags.__delattr__
16+
wtforms.fields.Flags.__setattr__
17+
wtforms.fields.core.Flags.__delattr__
18+
wtforms.fields.core.Flags.__setattr__
19+
1220
# Error: variable differs from runtime
1321
# ======================
1422
# _unbound_fields has some weird semantics: due to the metaclass it

stubs/passlib/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ passlib.utils.handlers.HasRounds.rounds
3838
# Errors in `__all__` at runtime:
3939
# TODO: change after https://github.com/python/mypy/pull/14217 is released
4040
passlib.handlers.oracle.__all__
41-
passlib.handlers.oracle.oracle11g
42-
passlib.handlers.oracle.oracle10g
4341
passlib.handlers.mysql.__all__
44-
passlib.handlers.mysql.mysq41
4542

4643
# Compat tools are ignored:
4744
passlib.utils.compat.*

stubs/python-xlib/@tests/stubtest_allowlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Xlib.protocol.rq.DictWrapper.__lt__
1212
Xlib.protocol.rq.Event.__gt__
1313
Xlib.protocol.rq.Event.__lt__
1414

15+
# should allow setting any attribute
16+
Xlib.protocol.rq.GetAttrData.__setattr__
17+
1518
# Can be None or str once instantiated
1619
Xlib.protocol.rq.*.structcode
1720
# Should only ever be str once instantiated

stubs/reportlab/@tests/stubtest_allowlist.txt

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,6 @@ reportlab.lib.utils.CIDict.get
5353
reportlab.lib.utils.CIDict.pop
5454
reportlab.lib.utils.CIDict.setdefault
5555

56-
# these have a __module__ argument which confuses stubtest
57-
reportlab.lib.testutils.rlSkip
58-
reportlab.lib.testutils.rlSkipIf
59-
reportlab.lib.testutils.rlSkipUnless
60-
61-
# __map__ argument confuses stubtest
62-
reportlab.lib.styles.str2alignment
63-
6456
# __new__ just forwards the arguments to the super class
6557
# it doesn't actually accept arbitrary arguments
6658
reportlab.platypus.doctemplate.PTCycle.__new__
@@ -83,6 +75,10 @@ reportlab.graphics.barcode.qrencoder.i
8375
reportlab.lib.fonts.k
8476
reportlab.lib.pdfencrypt.i
8577

78+
# should allow setting any attribute
79+
reportlab.lib.abag.ABag.__setattr__
80+
reportlab.lib.styles.PropertySet.__setattr__
81+
8682
# *-imports that cause a mess we don't want to propagate
8783
reportlab.graphics.charts.lineplots.pi
8884
reportlab\.graphics\.render(base|PDF|PM|PS|SVG)\.EVEN_ODD
@@ -95,25 +91,6 @@ reportlab\.graphics\.render(base|PDF|PM|PS|SVG)\.pi
9591
reportlab\.graphics\.render(base|PDF|PM|PS|SVG)\.shapeChecking
9692
reportlab\.graphics\.render(base|PDF|PM|PS|SVG)\.verbose
9793

98-
# messed up __all__ which contains just a string
99-
reportlab.graphics.barcode.qr.C
100-
reportlab.graphics.barcode.qr.Q
101-
reportlab.graphics.barcode.qr.W
102-
reportlab.graphics.barcode.qr.__all__
103-
reportlab.graphics.barcode.qr.d
104-
reportlab.graphics.barcode.qr.e
105-
reportlab.graphics.barcode.qr.g
106-
reportlab.graphics.barcode.qr.i
107-
reportlab.graphics.barcode.qr.o
108-
reportlab.graphics.barcode.qr.r
109-
reportlab.graphics.barcode.qr.t
110-
111-
# spelling mistake in __all__
112-
reportlab.graphics.barcode.ecc200datamatrix.ECC200datamatrix
113-
114-
# wasn't removed from __all__ by accident
115-
reportlab.graphics.barcode.eanbc.isEanString
116-
11794

11895
# Error: is not present at runtime
11996
# ================================

stubs/requests/@tests/stubtest_allowlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
requests.packages.mod
33
requests.packages.package
44
requests.packages.target
5+
6+
# Should allow setting any attribute:
7+
requests.structures.LookupDict.__setattr__

stubs/workalendar/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# VictoriaDayTuesdayAfterFirstMondayMay is not defined but used in __all__ runtime:
22
workalendar.europe.scotland.mixins.__all__
3-
workalendar.europe.scotland.mixins.VictoriaDayTuesdayAfterFirstMondayMay
43

54
workalendar.core.CoreCalendar.name
65
workalendar.skyfield_astronomy

0 commit comments

Comments
 (0)