Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: reformat to match packaging #175

Merged
merged 1 commit into from
Sep 30, 2024
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
29 changes: 14 additions & 15 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@

import pyproject_metadata


# -- Project information -----------------------------------------------------

project = 'pyproject-metadata'
copyright = '2021, Filipe Laíns'
author = 'Filipe Laíns'
project = "pyproject-metadata"
copyright = "2021, Filipe Laíns"
author = "Filipe Laíns"

# The short X.Y version
version = pyproject_metadata.__version__
Expand All @@ -31,38 +30,38 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
'sphinx_autodoc_typehints',
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"sphinx_autodoc_typehints",
]

intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
'packaging': ('https://packaging.pypa.io/en/latest/', None),
"python": ("https://docs.python.org/3/", None),
"packaging": ("https://packaging.pypa.io/en/latest/", None),
}

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

default_role = 'any'
default_role = "any"

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'furo'
html_title = f'pyproject-metadata {version}'
html_theme = "furo"
html_title = f"pyproject-metadata {version}"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named 'default.css' will overwrite the builtin 'default.css'.
# html_static_path = ['_static']

autoclass_content = 'both'
autoclass_content = "both"
29 changes: 14 additions & 15 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,32 @@

import nox


nox.options.sessions = ['mypy', 'test']
nox.options.sessions = ["mypy", "test"]
nox.options.reuse_existing_virtualenvs = True


@nox.session(python='3.7')
@nox.session(python="3.7")
def mypy(session: nox.Session) -> None:
session.install('.', 'mypy', 'nox', 'pytest')
session.install(".", "mypy", "nox", "pytest")

session.run('mypy', 'pyproject_metadata', 'tests', 'noxfile.py')
session.run("mypy", "pyproject_metadata", "tests", "noxfile.py")


@nox.session(python=['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13'])
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"])
def test(session: nox.Session) -> None:
htmlcov_output = os.path.join(session.virtualenv.location, 'htmlcov')
htmlcov_output = os.path.join(session.virtualenv.location, "htmlcov")
xmlcov_output = os.path.join(
session.virtualenv.location, f'coverage-{session.python}.xml'
session.virtualenv.location, f"coverage-{session.python}.xml"
)

session.install('.[test]')
session.install(".[test]")

session.run(
'pytest',
'--cov',
f'--cov-report=html:{htmlcov_output}',
f'--cov-report=xml:{xmlcov_output}',
'--cov-report=term-missing',
'tests/',
"pytest",
"--cov",
f"--cov-report=html:{htmlcov_output}",
f"--cov-report=xml:{xmlcov_output}",
"--cov-report=term-missing",
"tests/",
*session.posargs,
)
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,7 @@ ignore = [
"ISC001", # conflicts with formatter
"PLR09", # Design related (too many X)
]
isort.lines-after-imports = 2
isort.lines-between-types = 1

[tool.ruff.format]
quote-style = "single"


[tool.coverage]
Expand Down
Loading