Skip to content

reflex\testing.py is using platform.system, causing pre-commit error for Windows #2471

@tankztz

Description

@tankztz

Describe the bug
The output of sys.platform and os.name are determined at compile time. platform.system() determines the system type at run time. https://stackoverflow.com/questions/4553129/when-to-use-os-name-sys-platform-or-platform-system

Using platform.system for platform-specified call will not let the pre-commit check ignore unix calls in Windows, thus causing pre-commit error "getpgid" is not a known member of module "os"

Let's change it to sys.platform https://docs.python.org/3.11/library/sys.html#sys.platform

To Reproduce
Run pre-commit in Windows

Expected behavior
pre-commit check pass

Screenshots
image

Specifics (please complete the following information):

  • Python Version: 3.11
  • Reflex Version: latest develop
  • OS: Windows
  • Browser (Optional):

Additional context
Good first issue

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions