Skip to content

Commit

Permalink
Updates 241111 (#264)
Browse files Browse the repository at this point in the history
* Update to Python 3.13 and switch to Ruff linter

Updated configuration files to support Python 3.13, including project dependencies and pre-commit settings. Replaced Black and Flake8 with Ruff for linting and formatting tasks.

* Update Python version to 3.13 and fix formatting issues

Updated all instances of Python version from 3.12 to 3.13 in the GitHub workflow configuration. Also, added blank lines for improved readability and fixed minor formatting issues in helper function error messages.

* Trigger Build

* Fix ValueError message formatting in 'make_xeditable' helper

The existing error message for the 'make_xeditable' helper was split across multiple lines unnecessarily. This commit consolidates the message into fewer lines, improving readability and maintaining the same information.
  • Loading branch information
rh0dium authored Nov 11, 2024
1 parent 8198109 commit 2c7f512
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 26 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
cache: 'pip'

- name: Install dependencies
Expand All @@ -36,7 +36,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
cache: 'pip'

- name: Install dependencies
Expand All @@ -55,7 +55,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
cache: 'pip'

- name: Install dependencies
Expand All @@ -74,7 +74,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
cache: 'pip'

- name: Install dependencies
Expand All @@ -94,7 +94,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
cache: 'pip'

- name: Install dependencies
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
matrix:
db: [ sqlite, mariadb ]
django-version: [ "~=5.0" ]
python-version: [ "3.12" ]
python-version: ["3.12", "3.13" ]

services:
mariadb:
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: Install dependencies
run: |
Expand Down Expand Up @@ -214,7 +214,7 @@ jobs:
name: Release
if: ${{ github.event_name != 'schedule' }}
runs-on: ubuntu-latest
needs: ['outdated', 'black', 'pre-commit', 'security', 'tests', 'coverage' ]
needs: ['outdated', 'black', 'pre-commit', 'security', 'tests', 'coverage']
permissions: write-all
outputs:
bumped: ${{ steps.release.outputs.bumped }}
Expand All @@ -226,7 +226,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
- name: Install dependencies
run: |
pip install git+https://${{ secrets.ORGANIZATIONAL_REPO_TOKEN }}@github.com/pivotal-energy-solutions/tensor-infrastructure@master#egg=infrastructure
Expand Down
2 changes: 1 addition & 1 deletion .idea/django-datatable-view.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 10 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_language_version:
python: python3.10
python: python3.13
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
Expand All @@ -20,13 +20,12 @@ repos:
- id: mixed-line-ending
exclude: .idea/.*
- id: check-json
- repo: https://github.com/ambv/black
rev: 23.3.0
hooks:
- id: black
language_version: python3.10
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
language_version: python3.10
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.7.3
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
6 changes: 2 additions & 4 deletions datatableview/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,8 @@ def make_xeditable(instance=None, extra_attrs=[], *args, **kwargs): # noqa: C90
# Legacy syntax
field_name = field_name[1]
if isinstance(field_name, (tuple, list)):
raise ValueError(
"'make_xeditable' helper needs a single-field data column,"
" not {0!r}".format(field_name)
)
msg = f"'make_xeditable' helper needs a single-field data column, not {field_name!r}"
raise ValueError(msg)
attrs["data-name"] = field_name

if isinstance(rich_data, Model):
Expand Down
1 change: 1 addition & 0 deletions demo_app/demo_app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""

from django.contrib import admin
from django.urls import path, include

Expand Down
1 change: 1 addition & 0 deletions demo_app/manage.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Django's command-line utility for administrative tasks."""

import os
import sys

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Utilities",
]
dependencies = [
Expand Down

0 comments on commit 2c7f512

Please sign in to comment.