Skip to content

Support os.name for platform checks #2573

@carljm

Description

@carljm

I'd like to +1 the os.name support request. I have some code that was using os.name == "nt" and os.name != "nt" that pyright correctly handles, but ty gives unresolved-attribute errors on.
On finding this thread I've changed it to sys.platform checks instead, which works correctly.
If its difficult to support at this time maybe adding a mention to the docs and type system feature overview would be helpful?

Originally posted by @Clarkery in #160

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions