Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Pythonwin/pywin/docking/DockingBar.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,6 @@ def EditCreator(parent):


def test():
global bar
bar = DockingBar()
creator = EditCreator
bar.CreateWindow(win32ui.GetMainFrame(), creator, "Coolbar Demo", 0xFFFFF)
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/framework/intpydde.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import win32api
import win32ui
from dde import *
from dde import CreateServer, CreateServerSystemTopic
from pywin.mfc import object


Expand Down
2 changes: 1 addition & 1 deletion com/win32com/server/exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# Note that we derive from com_error, which derives from builtin Exception
# Also note that we don't support "self.args", as we don't support tuple-unpacking
class COMException(pythoncom.com_error):
class COMException(pythoncom.com_error): # type: ignore[name-defined] # Dynamic module
"""An Exception object that is understood by the framework.

If the framework is presented with an exception of type class,
Expand Down
28 changes: 22 additions & 6 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mypy_path =

; TODO: Gradually type classes and functions until we can turn back check_untyped_defs to true.
; For now this allows us to at least put mypy in place by massively reducing checked code
check_untyped_defs = false
check_untyped_defs = true
Comment thread
Avasam marked this conversation as resolved.
Outdated
; Implicit return types !
disallow_untyped_calls = false
disallow_untyped_defs = false
Expand All @@ -30,10 +30,26 @@ disable_error_code =
; Class cannot subclass "..." (has type "Any"); (IDEM)
; TODO: Use typeshed's types-pywin32 stubs after a few more fixes there
misc,
; Name "..." is not defined; (IDEM, leave undefined/unbound to Flake8/Ruff/pyright)
name-defined,
; Cannot assign to a method (we do lots of monkey patching)
method-assign,
; These are the other error codes that would currently fail with check_untyped_defs = true
; TODO: Gradually fix them until we can turn on check_untyped_defs
; arg-type,
; assignment,
; call-arg,
; comparison-overlap,
; has-type,
; index,
; list-item,
; operator,
; override,
; str-format,
; type-var,
; union-attr,
; valid-type,
; var-annotated,
; ; And these only happen when checking against types-pywin32
; func-returns-value,
; call-overload,
; no-redef,
exclude = (?x)(
^build/
; Vendored
Expand All @@ -45,7 +61,7 @@ exclude = (?x)(
)

; C-modules that will need type-stubs
[mypy-adsi.*,dde,exchange,exchdapi,mapi,perfmon,servicemanager,win32api,win32console,win32clipboard,win32comext.adsi.adsi,win32event,win32evtlog,win32file,win32gui,win32help,win32pdh,win32process,win32ras,win32security,win32service,win32trace,win32ui,win32uiole,win32wnet,_win32sysloader,_winxptheme]
[mypy-adsi.*,dde,exchange,exchdapi,mapi,perfmon,servicemanager,win32api,win32console,win32clipboard,win32comext.adsi.adsi,win32comext.mapi.mapi,win32event,win32evtlog,win32file,win32gui,win32help,win32pdh,win32process,win32ras,win32security,win32service,win32trace,win32ui,win32uiole,win32wnet,_win32sysloader,_winxptheme]
ignore_missing_imports = True

; verstamp is installed from win32verstamp.py called in setup.py
Expand Down