Skip to content

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Jan 17, 2025

Makes checking the existence of a path more idiomatic.
Reduces use of try-catch for logical flow.
Simplifies some code.
Solves a few "possibly unbound/undefined" variables as seen by type-checkers.

import win32api
import win32con


Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This module has been marked as deprecated for the past 18 years. A comment set it for removal around "2009 or so".
Would it be better to just remove it?

However it is used by win32/scripts/regsetup.py (checks the registry after Python registration). I'm not sure about a modern use case for the regsetup.py script either.

Fixes a few reportPossiblyUnboundVariable and possibly-undefined
@Avasam Avasam force-pushed the os.path.exists-over-os.stat branch from fd951fb to 40caf46 Compare January 17, 2025 02:58
@Avasam Avasam requested a review from mhammond May 30, 2025 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant