-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from OCR-D/use-ruff-config-like-dinglehoppers
Use ruff config like dinglehopper's
- Loading branch information
Showing
10 changed files
with
132 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
max_line_length = 88 | ||
tab_width = 4 | ||
|
||
[{*.cfg, *.ini, *.html, *.yaml, *.yml}] | ||
indent_size = 2 | ||
|
||
[*.json] | ||
indent_size = 2 | ||
insert_final_newline = true | ||
|
||
# trailing spaces in markdown indicate word wrap | ||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.py] | ||
multi_line_output = 3 | ||
include_trailing_comma = True | ||
force_grid_wrap = 0 | ||
use_parentheses = True | ||
ensure_newline_before_comments = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,32 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: check-ast | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.10.0 | ||
hooks: | ||
repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
- hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.0.280 | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.4.1 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: ['types-setuptools'] | ||
repo: https://github.com/psf/black | ||
rev: 23.10.0 | ||
- hooks: | ||
- args: | ||
- --fix | ||
- --exit-non-zero-on-fix | ||
id: ruff | ||
repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.1.0 | ||
- hooks: | ||
- additional_dependencies: | ||
- types-setuptools | ||
id: mypy | ||
repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.6.1 | ||
- hooks: | ||
- id: pre-commit-update | ||
repo: https://gitlab.com/vojko.pribudic/pre-commit-update | ||
rev: v0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import json | ||
|
||
from pkg_resources import resource_string | ||
|
||
OCRD_TOOL = json.loads(resource_string(__name__, "ocrd-tool.json").decode("utf8")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# TODO: This should go to pyproject.toml once we have one | ||
select = ["E", "F", "I"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.