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
1 change: 0 additions & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ jobs:
matrix: ${{ fromJson(needs.pre.outputs.matrix) }}

steps:

- uses: actions/checkout@v3
with:
fetch-depth: 0 # needed by setuptools-scm
Expand Down
45 changes: 30 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ ci:
# https://github.com/pre-commit-ci/issues/issues/55
- codecov
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
# keep it before yamllint
rev: v3.0.0-alpha.4
hooks:
- id: prettier
# Temporary excludes so we can gradually normalize the formatting
exclude: >
(?x)^(
tests/.*.html
)$
always_run: true
additional_dependencies:
- prettier
- prettier-plugin-toml
- prettier-plugin-sort-json
- repo: local
hooks:
- id: codecov
Expand Down Expand Up @@ -37,7 +52,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-byte-order-marker
- id: fix-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
Expand All @@ -54,22 +69,22 @@ repos:
- flake8-pytest-style>=1.5.0
language_version: python3
- repo: https://github.com/pycqa/pylint
rev: v2.15.9
rev: v2.16.0b0
hooks:
- id: pylint
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
hooks:
- id: mypy
# empty args needed in order to match mypy cli behavior
args: ["--strict"]
additional_dependencies:
- pytest
- types-setuptools
- types-pkg_resources
- types-mock
exclude: >
(?x)^(
docs/.*|
setup.py
)$
- id: mypy
# empty args needed in order to match mypy cli behavior
args: ["--strict"]
additional_dependencies:
- pytest
- types-setuptools
- types-pkg_resources
- types-mock
exclude: >
(?x)^(
docs/.*|
setup.py
)$
2 changes: 1 addition & 1 deletion ansi2html/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def get_styles(
raise ValueError(f"Unsupported color scheme {scheme!r}") from e

if len(pal) < 16:
raise Exception(
raise RuntimeError(
f"Color scheme {scheme!r} specifies fewer than 16 colors. 16 colors are required."
)

Expand Down
52 changes: 24 additions & 28 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
[build-system]
requires = [
"setuptools >= 45.0.0",
"setuptools_scm[toml] >= 7.0.0",
]
requires = ["setuptools >= 45.0.0", "setuptools_scm[toml] >= 7.0.0"]
build-backend = "setuptools.build_meta"

[tool.isort]
Expand All @@ -13,31 +10,30 @@ warn_return_any = true
warn_unused_configs = true

[tool.pylint."MESSAGES CONTROL"]

disable = [
# TODO(ssbarnea): remove temporary skips adding during initial adoption:
"attribute-defined-outside-init",
"consider-using-dict-comprehension",
"consider-using-enumerate",
"consider-using-f-string",
"deprecated-module",
"import-error",
"invalid-name",
"line-too-long",
"missing-class-docstring",
"missing-function-docstring",
"missing-module-docstring",
"redefined-builtin",
"redefined-outer-name",
"too-few-public-methods",
"too-many-arguments",
"too-many-branches",
"too-many-instance-attributes",
"too-many-locals",
"too-many-public-methods",
"too-many-statements",
"unused-argument",
"unused-variable",
# TODO(ssbarnea): remove temporary skips adding during initial adoption:
"attribute-defined-outside-init",
"consider-using-dict-comprehension",
"consider-using-enumerate",
"consider-using-f-string",
"deprecated-module",
"import-error",
"invalid-name",
"line-too-long",
"missing-class-docstring",
"missing-function-docstring",
"missing-module-docstring",
"redefined-builtin",
"redefined-outer-name",
"too-few-public-methods",
"too-many-arguments",
"too-many-branches",
"too-many-instance-attributes",
"too-many-locals",
"too-many-public-methods",
"too-many-statements",
"unused-argument",
"unused-variable",
]

[tool.pylint.REPORTS]
Expand Down