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

Fix document mode on macOS #2866

Merged
merged 6 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Add some missing python version coverage exclusions.
  • Loading branch information
freakboy3742 committed Sep 23, 2024
commit bc683c2f84f0ef23e897384b2876e997797566d8
8 changes: 4 additions & 4 deletions core/src/toga/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,14 +493,14 @@ def _install_task_factory_wrapper(self):

def factory(loop, coro, context=None):
if platform_task_factory is not None:
if sys.version_info < (3, 11):
if sys.version_info < (3, 11): # pragma: no-cover-if-gte-py311
task = platform_task_factory(loop, coro)
else:
else: # pragma: no-cover-if-lt-py311
task = platform_task_factory(loop, coro, context=context)
else:
if sys.version_info < (3, 11):
if sys.version_info < (3, 11): # pragma: no-cover-if-gte-py311
task = asyncio.Task(coro, loop=loop)
else:
else: # pragma: no-cover-if-lt-py311
task = asyncio.Task(coro, loop=loop, context=context)

self._running_tasks.add(task)
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ exclude_lines = [
no-cover-if-missing-setuptools_scm = "not is_installed('setuptools_scm')"
no-cover-if-missing-PIL = "not is_installed('PIL')"
no-cover-if-PIL-installed = "is_installed('PIL')"
no-cover-if-lt-py311 = "sys_version_info < (3, 11) and os_environ.get('COVERAGE_EXCLUDE_PYTHON_VERSION') != 'disable'"
no-cover-if-gte-py311 = "sys_version_info > (3, 11) and os_environ.get('COVERAGE_EXCLUDE_PYTHON_VERSION') != 'disable'"
no-cover-if-lt-py310 = "sys_version_info < (3, 10) and os_environ.get('COVERAGE_EXCLUDE_PYTHON_VERSION') != 'disable'"
no-cover-if-gte-py310 = "sys_version_info > (3, 10) and os_environ.get('COVERAGE_EXCLUDE_PYTHON_VERSION') != 'disable'"
no-cover-if-lt-py39 = "sys_version_info < (3, 9) and os_environ.get('COVERAGE_EXCLUDE_PYTHON_VERSION') != 'disable'"
Expand Down