Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hooks: add hook for yapf_third_party #792

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
15 changes: 15 additions & 0 deletions _pyinstaller_hooks_contrib/stdhooks/hook-yapf_third_party.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ------------------------------------------------------------------
# Copyright (c) 2024 PyInstaller Development Team.
#
# This file is distributed under the terms of the GNU General Public
# License (version 2.0 or later).
#
# The full license is available in LICENSE, distributed with
# this software.
#
# SPDX-License-Identifier: GPL-2.0-or-later
# ------------------------------------------------------------------

from PyInstaller.utils.hooks import collect_data_files

datas = collect_data_files('yapf_third_party')
2 changes: 2 additions & 0 deletions news/792.new.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Add hook for ``yapf_third_party`` (part of ``yapf``) to collect its
data files.
1 change: 1 addition & 0 deletions requirements-test-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ xarray==2024.7.0; python_version >= '3.9'
tables==3.10.1; python_version >= '3.10'
schwifty==2024.9.0 # pyup: != '2024.8.1'
patool==2.4.0; python_version >= '3.10'
yapf==0.40.2

# ------------------- Platform (OS) specifics

Expand Down
9 changes: 7 additions & 2 deletions tests/test_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -2156,8 +2156,6 @@ def test_itk(pyi_builder):
def test_slixmpp(pyi_builder):
pyi_builder.test_source("""
import slixmpp


slixmpp.ClientXMPP('username', 'password')
""")

Expand All @@ -2168,3 +2166,10 @@ def test_capstone(pyi_builder):
import capstone
capstone.__version__
""")


@importorskip('yapf')
def test_yapf(pyi_builder):
pyi_builder.test_source("""
import yapf
""")
Loading