Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Dec 6, 2024
1 parent 6380c76 commit 0f9ce90
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 117 deletions.
2 changes: 1 addition & 1 deletion extra_platforms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def group_membership_check() -> bool:
for _group in ALL_GROUPS:
func_id = f"is_{_group.id}"
assert func_id not in locals(), f"Function ID {func_id} already defined locally."
locals()[func_id] = _generate_group_membership_func(_group)
globals()[func_id] = _generate_group_membership_func(_group)
"""Generates an ``is_<group.id>()`` local function for each group.
These functions return a boolean value indicating the membership of the current
Expand Down
232 changes: 116 additions & 116 deletions extra_platforms/pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,134 +77,134 @@ def __bool__(self) -> bool:

# Generate @skip decorator.
skip_id = f"skip_{obj.id}"
locals()[skip_id] = pytest.mark.skipif(
globals()[skip_id] = pytest.mark.skipif(
DeferredCondition(func), # type: ignore[arg-type]
reason=f"Skip {short_desc}",
)

# Generate @unless decorator.
unless_id = f"unless_{obj.id}"
locals()[unless_id] = pytest.mark.skipif(
globals()[unless_id] = pytest.mark.skipif(
DeferredCondition(func, invert=True), # type: ignore[arg-type]
reason=f"Requires {short_desc}",
)


__all__ = (
"skip_aix", # noqa: F405
"skip_all_platforms", # noqa: F405
"skip_altlinux", # noqa: F405
"skip_amzn", # noqa: F405
"skip_android", # noqa: F405
"skip_any_windows", # noqa: F405
"skip_arch", # noqa: F405
"skip_bsd", # noqa: F405
"skip_bsd_without_macos", # noqa: F405
"skip_buildroot", # noqa: F405
"skip_centos", # noqa: F405
"skip_cloudlinux", # noqa: F405
"skip_cygwin", # noqa: F405
"skip_debian", # noqa: F405
"skip_exherbo", # noqa: F405
"skip_fedora", # noqa: F405
"skip_freebsd", # noqa: F405
"skip_gentoo", # noqa: F405
"skip_guix", # noqa: F405
"skip_hurd", # noqa: F405
"skip_ibm_powerkvm", # noqa: F405
"skip_kvmibm", # noqa: F405
"skip_linux", # noqa: F405
"skip_linux_layers", # noqa: F405
"skip_linux_like", # noqa: F405
"skip_linuxmint", # noqa: F405
"skip_macos", # noqa: F405
"skip_mageia", # noqa: F405
"skip_mandriva", # noqa: F405
"skip_midnightbsd", # noqa: F405
"skip_netbsd", # noqa: F405
"skip_openbsd", # noqa: F405
"skip_opensuse", # noqa: F405
"skip_oracle", # noqa: F405
"skip_other_unix", # noqa: F405
"skip_parallels", # noqa: F405
"skip_pidora", # noqa: F405
"skip_raspbian", # noqa: F405
"skip_rhel", # noqa: F405
"skip_rocky", # noqa: F405
"skip_scientific", # noqa: F405
"skip_slackware", # noqa: F405
"skip_sles", # noqa: F405
"skip_solaris", # noqa: F405
"skip_sunos", # noqa: F405
"skip_system_v", # noqa: F405
"skip_tumbleweed", # noqa: F405
"skip_tuxedo", # noqa: F405
"skip_ubuntu", # noqa: F405
"skip_unix", # noqa: F405
"skip_unix_layers", # noqa: F405
"skip_unix_without_macos", # noqa: F405
"skip_unknown_linux", # noqa: F405
"skip_windows", # noqa: F405
"skip_wsl1", # noqa: F405
"skip_wsl2", # noqa: F405
"skip_xenserver", # noqa: F405
"unless_aix", # noqa: F405
"unless_all_platforms", # noqa: F405
"unless_altlinux", # noqa: F405
"unless_amzn", # noqa: F405
"unless_android", # noqa: F405
"unless_any_windows", # noqa: F405
"unless_arch", # noqa: F405
"unless_bsd", # noqa: F405
"unless_bsd_without_macos", # noqa: F405
"unless_buildroot", # noqa: F405
"unless_centos", # noqa: F405
"unless_cloudlinux", # noqa: F405
"unless_cygwin", # noqa: F405
"unless_debian", # noqa: F405
"unless_exherbo", # noqa: F405
"unless_fedora", # noqa: F405
"unless_freebsd", # noqa: F405
"unless_gentoo", # noqa: F405
"unless_guix", # noqa: F405
"unless_hurd", # noqa: F405
"unless_ibm_powerkvm", # noqa: F405
"unless_kvmibm", # noqa: F405
"unless_linux", # noqa: F405
"unless_linux_layers", # noqa: F405
"unless_linux_like", # noqa: F405
"unless_linuxmint", # noqa: F405
"unless_macos", # noqa: F405
"unless_mageia", # noqa: F405
"unless_mandriva", # noqa: F405
"unless_midnightbsd", # noqa: F405
"unless_netbsd", # noqa: F405
"unless_openbsd", # noqa: F405
"unless_opensuse", # noqa: F405
"unless_oracle", # noqa: F405
"unless_other_unix", # noqa: F405
"unless_parallels", # noqa: F405
"unless_pidora", # noqa: F405
"unless_raspbian", # noqa: F405
"unless_rhel", # noqa: F405
"unless_rocky", # noqa: F405
"unless_scientific", # noqa: F405
"unless_slackware", # noqa: F405
"unless_sles", # noqa: F405
"unless_solaris", # noqa: F405
"unless_sunos", # noqa: F405
"unless_system_v", # noqa: F405
"unless_tumbleweed", # noqa: F405
"unless_tuxedo", # noqa: F405
"unless_ubuntu", # noqa: F405
"unless_unix", # noqa: F405
"unless_unix_layers", # noqa: F405
"unless_unix_without_macos", # noqa: F405
"unless_unknown_linux", # noqa: F405
"unless_windows", # noqa: F405
"unless_wsl1", # noqa: F405
"unless_wsl2", # noqa: F405
"unless_xenserver", # noqa: F405
"skip_aix", # noqa: F405, F822
"skip_all_platforms", # noqa: F405, F822
"skip_altlinux", # noqa: F405, F822
"skip_amzn", # noqa: F405, F822
"skip_android", # noqa: F405, F822
"skip_any_windows", # noqa: F405, F822
"skip_arch", # noqa: F405, F822
"skip_bsd", # noqa: F405, F822
"skip_bsd_without_macos", # noqa: F405, F822
"skip_buildroot", # noqa: F405, F822
"skip_centos", # noqa: F405, F822
"skip_cloudlinux", # noqa: F405, F822
"skip_cygwin", # noqa: F405, F822
"skip_debian", # noqa: F405, F822
"skip_exherbo", # noqa: F405, F822
"skip_fedora", # noqa: F405, F822
"skip_freebsd", # noqa: F405, F822
"skip_gentoo", # noqa: F405, F822
"skip_guix", # noqa: F405, F822
"skip_hurd", # noqa: F405, F822
"skip_ibm_powerkvm", # noqa: F405, F822
"skip_kvmibm", # noqa: F405, F822
"skip_linux", # noqa: F405, F822
"skip_linux_layers", # noqa: F405, F822
"skip_linux_like", # noqa: F405, F822
"skip_linuxmint", # noqa: F405, F822
"skip_macos", # noqa: F405, F822
"skip_mageia", # noqa: F405, F822
"skip_mandriva", # noqa: F405, F822
"skip_midnightbsd", # noqa: F405, F822
"skip_netbsd", # noqa: F405, F822
"skip_openbsd", # noqa: F405, F822
"skip_opensuse", # noqa: F405, F822
"skip_oracle", # noqa: F405, F822
"skip_other_unix", # noqa: F405, F822
"skip_parallels", # noqa: F405, F822
"skip_pidora", # noqa: F405, F822
"skip_raspbian", # noqa: F405, F822
"skip_rhel", # noqa: F405, F822
"skip_rocky", # noqa: F405, F822
"skip_scientific", # noqa: F405, F822
"skip_slackware", # noqa: F405, F822
"skip_sles", # noqa: F405, F822
"skip_solaris", # noqa: F405, F822
"skip_sunos", # noqa: F405, F822
"skip_system_v", # noqa: F405, F822
"skip_tumbleweed", # noqa: F405, F822
"skip_tuxedo", # noqa: F405, F822
"skip_ubuntu", # noqa: F405, F822
"skip_unix", # noqa: F405, F822
"skip_unix_layers", # noqa: F405, F822
"skip_unix_without_macos", # noqa: F405, F822
"skip_unknown_linux", # noqa: F405, F822
"skip_windows", # noqa: F405, F822
"skip_wsl1", # noqa: F405, F822
"skip_wsl2", # noqa: F405, F822
"skip_xenserver", # noqa: F405, F822
"unless_aix", # noqa: F405, F822
"unless_all_platforms", # noqa: F405, F822
"unless_altlinux", # noqa: F405, F822
"unless_amzn", # noqa: F405, F822
"unless_android", # noqa: F405, F822
"unless_any_windows", # noqa: F405, F822
"unless_arch", # noqa: F405, F822
"unless_bsd", # noqa: F405, F822
"unless_bsd_without_macos", # noqa: F405, F822
"unless_buildroot", # noqa: F405, F822
"unless_centos", # noqa: F405, F822
"unless_cloudlinux", # noqa: F405, F822
"unless_cygwin", # noqa: F405, F822
"unless_debian", # noqa: F405, F822
"unless_exherbo", # noqa: F405, F822
"unless_fedora", # noqa: F405, F822
"unless_freebsd", # noqa: F405, F822
"unless_gentoo", # noqa: F405, F822
"unless_guix", # noqa: F405, F822
"unless_hurd", # noqa: F405, F822
"unless_ibm_powerkvm", # noqa: F405, F822
"unless_kvmibm", # noqa: F405, F822
"unless_linux", # noqa: F405, F822
"unless_linux_layers", # noqa: F405, F822
"unless_linux_like", # noqa: F405, F822
"unless_linuxmint", # noqa: F405, F822
"unless_macos", # noqa: F405, F822
"unless_mageia", # noqa: F405, F822
"unless_mandriva", # noqa: F405, F822
"unless_midnightbsd", # noqa: F405, F822
"unless_netbsd", # noqa: F405, F822
"unless_openbsd", # noqa: F405, F822
"unless_opensuse", # noqa: F405, F822
"unless_oracle", # noqa: F405, F822
"unless_other_unix", # noqa: F405, F822
"unless_parallels", # noqa: F405, F822
"unless_pidora", # noqa: F405, F822
"unless_raspbian", # noqa: F405, F822
"unless_rhel", # noqa: F405, F822
"unless_rocky", # noqa: F405, F822
"unless_scientific", # noqa: F405, F822
"unless_slackware", # noqa: F405, F822
"unless_sles", # noqa: F405, F822
"unless_solaris", # noqa: F405, F822
"unless_sunos", # noqa: F405, F822
"unless_system_v", # noqa: F405, F822
"unless_tumbleweed", # noqa: F405, F822
"unless_tuxedo", # noqa: F405, F822
"unless_ubuntu", # noqa: F405, F822
"unless_unix", # noqa: F405, F822
"unless_unix_layers", # noqa: F405, F822
"unless_unix_without_macos", # noqa: F405, F822
"unless_unknown_linux", # noqa: F405, F822
"unless_windows", # noqa: F405, F822
"unless_wsl1", # noqa: F405, F822
"unless_wsl2", # noqa: F405, F822
"unless_xenserver", # noqa: F405, F822
)
"""Expose all generated decorators.
Expand Down

0 comments on commit 0f9ce90

Please sign in to comment.