Skip to content
Open
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
28 changes: 6 additions & 22 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,8 @@ repos:
- id: trailing-whitespace
args:
- "--markdown-linebreak-ext=md"
- repo: "https://github.com/pre-commit/pygrep-hooks"
rev: v1.9.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- id: python-use-type-annotations
- repo: "https://github.com/pycqa/isort"
rev: 5.10.1
hooks:
- id: isort
- repo: "https://github.com/psf/black"
rev: 22.3.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: "23.9.1"
hooks:
- id: black
- repo: "https://github.com/pre-commit/mirrors-prettier"
Expand All @@ -49,14 +39,8 @@ repos:
- id: pyupgrade
args:
- "--py36-plus"
- repo: https://github.com/pycqa/pylint
# 2.13.9 is the last version supporting Python 3.6
rev: v2.13.9
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.5"
hooks:
- id: pylint
- repo: "https://github.com/fsfe/reuse-tool"
rev: v0.14.0
hooks:
- id: reuse
additional_dependencies:
- python-debian==0.1.40
- id: ruff
args: ["--fix", "--show-fixes"]
1 change: 0 additions & 1 deletion newfile2

This file was deleted.

58 changes: 58 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# SPDX-FileCopyrightText: 2022 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "planetsmath"
requires-python = ">= 3.8"
version = "0.0.1"
description = "Lovely Spam! Wonderful Spam!"
readme = "README.md"
license = {file = "LICENSE"}

[tool.ruff]
lint.select = [
"E", "F", "W", # flake8
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"NPY", # NumPy specific rules
"PD", # pandas-vet
]
lint.extend-ignore = [
"PLR", # Design related pylint codes
"E501", # Line too long
"PT004", # Use underscore for non-returning fixture (use usefixture instead)
]
lint.typing-modules = ["mypackage._compat.typing"]
src = ["src"]
lint.unfixable = [
"T20", # Removes print statements
"F841", # Removes unused variables
]
exclude = []
lint.flake8-unused-arguments.ignore-variadic-names = true
lint.isort.required-imports = ["from __future__ import annotations"]

[tool.ruff.lint.per-file-ignores]
"tests/**" = ["T20"]
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-FileCopyrightText: 2022 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

from setuptools import setup

Expand Down
1 change: 1 addition & 0 deletions src/planetsmath/functions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-FileCopyrightText: 2022 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations


def sum_function(list):
Expand Down
1 change: 1 addition & 0 deletions src/planetsmath/test_functions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-FileCopyrightText: 2022 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

from .functions import sum_function

Expand Down