-
Notifications
You must be signed in to change notification settings - Fork 19
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 #51 from artshumrc/49_use_ruff
Ruff config and module import updates
- Loading branch information
Showing
9 changed files
with
167 additions
and
12 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,22 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
exclude: "business-facing/layer" | ||
- id: trailing-whitespace | ||
exclude: "business-facing/layer" | ||
- id: check-yaml | ||
exclude: "business-facing/layer" | ||
- id: check-json | ||
exclude: "business-facing/layer" | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.4.4 | ||
hooks: | ||
# Run the linter, and enable lint fixes | ||
- id: ruff | ||
args: [ --fix ] | ||
# Run the formatter. | ||
- id: ruff-format |
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,5 @@ | ||
-r requirements.txt # Include all main requirements | ||
django>=4.2,<5.0 | ||
pytest | ||
ruff | ||
pre-commit |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
from .en import text_to_edtf | ||
|
||
__all__ = ["text_to_edtf"] |
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,2 +1,51 @@ | ||
from edtf.parser.grammar import parse_edtf | ||
from edtf.parser.parser_classes import * | ||
from .edtf_exceptions import EDTFParseException | ||
from .grammar import parse_edtf | ||
from .parser_classes import ( | ||
UA, | ||
Consecutives, | ||
Date, | ||
DateAndTime, | ||
EarlierConsecutives, | ||
EDTFObject, | ||
ExponentialYear, | ||
Interval, | ||
LaterConsecutives, | ||
Level1Interval, | ||
Level2Interval, | ||
Level2Season, | ||
LongYear, | ||
MultipleDates, | ||
OneOfASet, | ||
PartialUncertainOrApproximate, | ||
PartialUnspecified, | ||
Season, | ||
UncertainOrApproximate, | ||
Unspecified, | ||
UnspecifiedIntervalSection, | ||
) | ||
|
||
__all__ = [ | ||
"parse_edtf", | ||
"EDTFParseException", | ||
"EDTFObject", | ||
"Date", | ||
"DateAndTime", | ||
"Interval", | ||
"UA", | ||
"UncertainOrApproximate", | ||
"Unspecified", | ||
"UnspecifiedIntervalSection", | ||
"Level1Interval", | ||
"LongYear", | ||
"Season", | ||
"PartialUncertainOrApproximate", | ||
"PartialUnspecified", | ||
"Consecutives", | ||
"EarlierConsecutives", | ||
"LaterConsecutives", | ||
"OneOfASet", | ||
"MultipleDates", | ||
"Level2Interval", | ||
"Level2Season", | ||
"ExponentialYear", | ||
] |
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