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

Fixed formatting #172

Merged
merged 3 commits into from
Oct 6, 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
10 changes: 9 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@ jobs:

steps:

- uses: "actions/checkout@v4"
- name: "Checkout PR"
uses: "actions/checkout@v4"
if: github.event_name == 'pull_request_target'
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge

- name: "Checkout Branch"
uses: "actions/checkout@v4"
if: github.event_name == 'push'

- name: "Set up Python ${{ matrix.python-version }}"
uses: "actions/setup-python@v5"
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ upload:
check:
ruff format --check
ruff check

reformat:
ruff format
6 changes: 3 additions & 3 deletions src/pyswip/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,11 @@


class PySwipError(Exception):

def __init__(self, message):
super().__init__(message)


class SwiPrologNotFoundError(PySwipError):

def __init__(self, message="SWI-Prolog not found"):
super().__init__(message)

Expand Down Expand Up @@ -188,7 +186,9 @@ def _find_swipl_windows():
# libswipl.dll must be in SWI_DIR/bin
libswipl_path = os.path.join(swi_dir, "bin", libswipl)
if not os.path.exists(libswipl_path):
raise SwiPrologNotFoundError(f"could not locate {libswipl} at {libswipl_path}")
raise SwiPrologNotFoundError(
f"could not locate {libswipl} at {libswipl_path}"
)
return libswipl_path, swi_dir

raise SwiPrologNotFoundError
Expand Down
1 change: 1 addition & 0 deletions tests/test_prolog.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"""
Tests the Prolog class.
"""

import os.path
import unittest

Expand Down
Loading