Skip to content
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
11 changes: 8 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
default_language_version:
python: python
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-merge-conflict
Expand All @@ -15,16 +16,20 @@ repos:
exclude: ChangeLog-spell-corrected.diff
- id: check-json
exclude: mathics_scanner/data/character-tables.json
- repo: https://github.com/pycqa/isort
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
stages: [pre-commit]
args: ["--profile", "black"]
- repo: https://github.com/psf/black
- repo: https://github.com/psf/black
rev: 25.11.0
hooks:
- id: black
language_version: python3
stages: [pre-commit]
exclude: version.py
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.31.0 # Use the latest version
hooks:
- id: check-github-workflows
4 changes: 4 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# -*- conf -*-
# .yamllint configuration file
rules:
line-length: disable
5 changes: 4 additions & 1 deletion mathics_scanner/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ def get_location_file_line(
filename = code.co_filename
line_number = code.co_firstlineno
else:
filename = MATHICS3_PATHS[loc.container]
try:
filename = MATHICS3_PATHS[loc.container]
except IndexError:
filename = "???"
line_number = loc.start_line
return filename, line_number
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
Expand All @@ -45,6 +44,8 @@ Homepage = "https://mathics.org/"

[project.optional-dependencies]
dev = [
"check-jsonschema",
"pre-commit",
"pytest",
]
full = [
Expand Down
Loading