Skip to content
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ dist/
# Coverage
.coverage
coverage.xml

# Nox
.nox
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?style=flat-square&logo=pre-commit)][pre-commit.ci]

[![nox](https://img.shields.io/badge/%F0%9F%A6%8A-Nox-D85E00.svg?style=flat-square)][nox]
[![ruff](https://img.shields.io/endpoint?style=flat-square&url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)][ruff]
[![mypy](https://img.shields.io/badge/type--checked-mypy-blue?style=flat-square)][mypy]
[![black](https://img.shields.io/badge/code%20style-black-black?style=flat-square)][black]
Expand Down Expand Up @@ -36,5 +37,6 @@ Released under the [MIT License][license].
[gitmoji-website]: https://gitmoji.dev
[license]: https://github.com/paduszyk/python-gitmojis/blob/main/LICENSE
[mypy]: https://github.com/python/mypy
[nox]: https://github.com/wntrblm/nox
[pre-commit.ci]: https://results.pre-commit.ci/latest/github/paduszyk/python-gitmojis/main
[ruff]: https://github.com/astral-sh/ruff
35 changes: 35 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import nox

# Nox sessions and configuration
# https://nox.thea.codes/en/stable/config.html


@nox.session()
def black(session: nox.Session) -> None:
session.install("black")
session.run("black", "--check", "--diff", ".")


@nox.session()
def mypy(session: nox.Session) -> None:
session.install("-e", ".")
session.install("mypy")
session.run("mypy", "--install-types", "--non-interactive", ".")


@nox.session()
def ruff(session: nox.Session) -> None:
session.install("ruff")
session.run("ruff", "check", "--diff", ".")


@nox.session(
python=[
"3.10",
"3.11",
"3.12",
]
)
def test(session: nox.Session) -> None:
session.install("-e", ".[test]")
session.run("pytest")
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies = []

[project.optional-dependencies]
dev = [
"nox",
"pre-commit",
]
lint = [
Expand Down