Skip to content

Commit

Permalink
Version 1.3.3
Browse files Browse the repository at this point in the history
Update pre-commit hooks, drop official python 3.8 support, and enable more ruff rules
  • Loading branch information
CoolCat467 committed Dec 30, 2024
1 parent bd0c0d7 commit e157433
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 32 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@main
Expand Down
21 changes: 12 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ci:
autofix_prs: true
autoupdate_schedule: weekly
skip: [badgie]
autoupdate_schedule: quarterly
submodules: false
skip: [badgie]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -18,13 +18,6 @@ repos:
- id: check-case-conflict
- id: sort-simple-yaml
files: .pre-commit-config.yaml
- repo: https://github.com/hadialqattan/pycln
rev: v2.4.0
hooks:
- id: pycln
args: [--config=pyproject.toml, src]
types: [file]
types_or: [python, pyi]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
Expand All @@ -43,3 +36,13 @@ repos:
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/crate-ci/typos
rev: v1.28.4
hooks:
- id: typos
- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v0.10.0
hooks:
- id: zizmor
5 changes: 4 additions & 1 deletion helpers/gen_file_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@

import json
import os
from typing import Any, Container
from typing import TYPE_CHECKING, Any

if TYPE_CHECKING:
from collections.abc import Container


def get_file_list(
Expand Down
42 changes: 23 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ authors = [
description = "Fix LWJGL (Light Weight Java Game Library) version used in Minecraft for ARM devices"
readme = {file = "README.md", content-type = "text/markdown"}
license = {file = "LICENSE"}
requires-python = ">=3.8"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: End Users/Desktop",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -33,8 +32,8 @@ keywords = [
"wrapper-script"
]
dependencies = [
"trio~=0.27.0",
"httpx~=0.28.0",
"trio~=0.28.0",
"httpx~=0.28.1",
]

[tool.setuptools.dynamic]
Expand All @@ -51,7 +50,7 @@ fix_lwjgl_wrapper = "fix_lwjgl:cli_run"
fix_lwjgl = ["py.typed"]

[tool.mypy]
mypy_path = "src"
files = ["src/fix_lwjgl/",]
check_untyped_defs = true
disallow_any_decorated = true
disallow_any_generics = true
Expand Down Expand Up @@ -88,7 +87,6 @@ disable_all_dunder_policy = true

[tool.black]
line-length = 79
target-version = ['py38']

[tool.ruff]
line-length = 79
Expand All @@ -108,12 +106,16 @@ select = [
"EXE", # flake8-executable
"F", # pyflakes
"FA", # flake8-future-annotations
"FLY", # flynt
"FURB", # refurb
"I", # isort
"ICN", # flake8-import-conventions
"N", # pep8-naming
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"PYI", # flake8-pyi
"Q", # flake8-quotes
"R", # Refactor
"RET", # flake8-return
"RUF", # Ruff-specific rules
"S", # flake8-bandit
Expand All @@ -125,31 +127,33 @@ select = [
"YTT", # flake8-2020
]
extend-ignore = [
"E501", # line-too-long
"S101", # use of assert for tests and type narrowing
"D203", # One blank line before class
"D204", # blank line thing
"D203", # one-blank-line-before-class
"D204", # one-blank-line-after-class
"D211", # no-blank-line-before-class
"D213", # multi-line-summary-second-line
"SIM117", # Use multiple with statements at the same time
"D417", # undocumented-param "Missing argument descriptions"
"E501", # line-too-long
"PYI041", # redundant-numeric-union
"S101", # assert (use of assert for tests and type narrowing)
"SIM117", # multiple-with-statements
]

[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"D100", # undocumented-public-module
"D103", # undocumented-public-function
"D107", # Missing docstring
"D107", # undocumented-public-init
]

[tool.pytest.ini_options]
addopts = "--cov-report term-missing --cov=fix_lwjgl"
addopts = "--cov-report=term-missing --cov=fix_lwjgl"
testpaths = [
"tests",
]

[tool.coverage.run]
branch = true
source = ["src"]
source_pkgs = ["fix_lwjgl"]
omit = []

[tool.coverage.report]
Expand Down Expand Up @@ -178,16 +182,16 @@ partial_branches = [
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py38, py39, py310, py311, py312, mypy, pytest
envlist = py39, py310, py311, py312, py313, mypy, pytest
isolated_build = false
[gh-actions]
python =
3.8: py38, pytest, mypy
3.9: py39, pytest
3.9: py39, pytest, mypy
3.10: py310, pytest
3.11: py311, pytest
3.12: py312, pytest, mypy
3.12: py312, pytest
3.13: py313, pytest, mypy
[testenv]
setenv =
Expand All @@ -203,5 +207,5 @@ legacy_tox_ini = """
[testenv:mypy]
deps =
mypy
commands = mypy src
commands = mypy
"""
7 changes: 5 additions & 2 deletions src/fix_lwjgl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

__title__ = "Fix-LWJGL"
__author__ = "CoolCat467"
__version__ = "1.3.2"
__version__ = "1.3.3"
__license__ = "MIT"


Expand All @@ -45,11 +45,14 @@
import subprocess
import sys
from configparser import ConfigParser
from typing import Any, Final, Iterable, Iterator
from typing import TYPE_CHECKING, Any, Final

import httpx
import trio

if TYPE_CHECKING:
from collections.abc import Iterable, Iterator

HOME = os.getenv("HOME", os.path.expanduser("~"))
XDG_DATA_HOME = os.getenv(
"XDG_DATA_HOME",
Expand Down

0 comments on commit e157433

Please sign in to comment.