Skip to content

Commit

Permalink
Merge 5f4907c into 40f21a1
Browse files Browse the repository at this point in the history
  • Loading branch information
DeviousStoat committed Feb 13, 2024
2 parents 40f21a1 + 5f4907c commit 2a0c9e3
Show file tree
Hide file tree
Showing 24 changed files with 1,775 additions and 1,375 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
pkg_info = importlib.metadata.metadata("pydash")

project = pkg_info["Name"]
author = pkg_info["Author"]
author = pkg_info["Author-email"]
description = pkg_info["Summary"]
copyright = "2013, " + author

Expand Down
106 changes: 0 additions & 106 deletions pylintrc

This file was deleted.

157 changes: 139 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,144 @@
[build-system]
requires = [
"setuptools>=46.4",
"wheel",
]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "pydash"
dynamic = ["version"]
authors = [{ name = "Derrick Gilland", email = "dgilland@gmail.com" }]
description = 'The kitchen sink of Python utility libraries for doing "stuff" in a functional way. Based on the Lo-Dash Javascript library.'
readme = "README.rst"
license = { file = "LICENSE.rst" }
keywords = ["pydash", "utility", "functional", "lodash", "underscore"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
]
requires-python = ">=3.8"
dependencies = ["typing-extensions>3.10,!=4.6.0"]

[project.urls]
Homepage = "https://github.com/dgilland/pydash"
Documentation = "https://pydash.readthedocs.org"
Repository = "https://github.com/dgilland/pydash"
Issues = "https://github.com/dgilland/pydash/issues"
Changelog = "https://github.com/dgilland/pydash/blob/develop/CHANGELOG.rst"

[project.optional-dependencies]
dev = [
"build",
"coverage",
"ruff",
"furo",
"invoke",
"mypy",
"pytest",
"pytest-mypy-testing",
"pytest-cov",
"sphinx",
"tox",
"twine",
"wheel",
"sphinx-autodoc-typehints",
]

[tool.setuptools.dynamic]
version = { attr = "pydash.__version__" }

[tool.distutils.bdist_wheel]
python-tag = "py3"

[tool.black]
[tool.ruff]
src = ["src"]
extend-exclude = [".cache", "tests/pytest_mypy_testing"]
extend-include = ["*.pyi"]
line-length = 100
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.mypy_cache
| \.tox
| \.venv
| \.cache
| _build
| build
| dist
)/
'''
# target the lowest supported version to avoid introducing unsupported syntax
target-version = "py38"

[tool.ruff.lint]
select = [
# flake8
"F",
"E",
"W",
# flake8-bugbear
"B",
# pylint
"PL",
]
# F811 - redefinition of unused `name` from line `N`
# E203 - whitespace before ':'
# E701 - multiple statements on one line (colon)
# PLR2004 - Magic value used in comparison, consider replacing `...` with a constant variable
# PLW2901 - `...` loop variable `...` overwritten by assignment target
ignore = ["F811", "E203", "E701", "PLR2004", "PLW2901"]

[tool.ruff.lint.extend-per-file-ignores]
# Exceptions for the type stub
# F403 - `from module import *` used; unable to detect undefined names
# F405 - name may be undefined, or defined from star imports
# E501 - line too long
# PLR0913 - Too many arguments in function definition
"*.pyi" = ["F403", "F405", "E501", "PLR0913"]

[tool.ruff.lint.isort]
lines-after-imports = 2
combine-as-imports = true
force-sort-within-sections = true

[tool.ruff.format]
docstring-code-format = true

[tool.mypy]
mypy_path = ["src"]
python_version = "3.8"
exclude = [
"tests/pytest_mypy_testing",
]
show_column_numbers = true
show_error_context = false
ignore_missing_imports = true
warn_return_any = false
strict_optional = true
warn_no_return = true
warn_redundant_casts = false
warn_unused_ignores = false

[tool.pytest.ini_options]
addopts = [
"--verbose",
"--doctest-modules",
"--no-cov-on-fail",
"--cov-fail-under=100",
"--cov-report=term-missing",
"--cov-report=xml:build/coverage/coverage.xml",
"--cov-report=html:build/coverage",
"--junitxml=build/testresults/junit.xml",
]

[tool.coverage.run]
omit = [
"*/tests/*",
"*/test_*",
"*/_compat.py",
"*/types.py",
]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"@t.overload"
]
2 changes: 1 addition & 1 deletion scripts/chaining_type_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
SupportsSub,
)
Value_coT = t.TypeVar("Value_coT", covariant=True)
ValueT_co = t.TypeVar("ValueT_co", covariant=True)
T = t.TypeVar("T")
T1 = t.TypeVar("T1")
T2 = t.TypeVar("T2")
Expand Down
3 changes: 2 additions & 1 deletion scripts/mypy_doctests_generator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import re
import sys
import typing as t
from pathlib import Path

Expand Down Expand Up @@ -70,6 +71,6 @@ def main(path: Path) -> str:

if not args.filename.exists():
print(f"`{args.filename}` does not exist")
exit(1)
sys.exit(1)

args.output.write_text(main(args.filename))

0 comments on commit 2a0c9e3

Please sign in to comment.