Skip to content

Commit 0e3e9d9

Browse files
authored
Merge pull request #7 from ddxv/pre-commit-pyroject
Added a .pre-commit config with ruff and mypy
2 parents 161c080 + ab0aa4d commit 0e3e9d9

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,6 @@ cython_debug/
160160
#.idea/
161161
/.idea/
162162
/umami/example_client/settings.json
163+
164+
# ruff
165+
.ruff_cache/

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/charliermarsh/ruff-pre-commit
3+
# Ruff version.
4+
rev: "v0.1.14"
5+
hooks:
6+
- id: ruff
7+
args: [--fix]

ruff.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ format.quote-style = "single"
44

55
# Enable Pyflakes `E` and `F` codes by default.
66
select = ["E", "F"]
7-
ignore = []
7+
ignore = [
8+
"E501" # Line length
9+
]
810

911
# Exclude a variety of commonly ignored directories.
1012
exclude = [

umami/umami/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Website(pydantic.BaseModel):
5656

5757

5858
class WebsitesResponse(pydantic.BaseModel):
59-
websites: list[Website] = pydantic.Field(alias="data")
59+
websites: list[Website] = pydantic.Field(alias='data')
6060
count: int
6161
page: int
6262
pageSize: int

0 commit comments

Comments
 (0)