Skip to content

Commit

Permalink
add ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
leondaz committed Dec 13, 2023
1 parent cfd68ee commit a000955
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 86 deletions.
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ repos:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.7
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format

- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
Expand Down
1 change: 0 additions & 1 deletion commonkit/rest_framework/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ def render_success(self, data, accepted_media_type=None, renderer_context=None):
return data

def render_errors(self, data, accepted_media_type=None, renderer_context=None):
response = renderer_context["response"]
field_errors = {}
non_field_errors = []

Expand Down
3 changes: 0 additions & 3 deletions example/core/tests.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
from django.test import TestCase

# Create your tests here.
179 changes: 100 additions & 79 deletions poetry.lock

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "commonkit"
version = "1.0.6"
version = "1.0.7"
description = "A library for handling common stuff in Python"
authors = ["leondaz <[email protected]>"]
license = "MIT"
Expand All @@ -12,6 +12,9 @@ python = "^3.9"
djangorestframework = "^3.14.0"
django = "^4.2.7"

[tool.poetry.group.dev]
optional = true

[tool.poetry.group.dev.dependencies]
pandas = "^2.1.3"
black = "^23.11.0"
Expand All @@ -29,6 +32,7 @@ xlsx2csv = "^0.8.1"
build = "^1.0.3"
twine = "^4.0.2"
pre-commit = "^3.6.0"
ruff = "^0.1.7"

[build-system]
requires = ["poetry-core"]
Expand Down
1 change: 0 additions & 1 deletion source/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import sys
from pathlib import Path

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
PANDAS_FIXTURES = [
"csv_file",
"xlsx_file",
"json_file"
"json_file",
# "xml_file",
# "sql_file",
]
Expand Down

0 comments on commit a000955

Please sign in to comment.