diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f3af91..3fa7253 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,32 +3,32 @@ exclude: tests/etc/user-* repos: - repo: https://github.com/PyCQA/bandit - rev: 1.7.5 + rev: 1.7.7 hooks: - id: bandit args: - "-x *test*.py" - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 24.1.1 hooks: - id: black language_version: python3.11 - repo: https://github.com/pycqa/flake8 - rev: 6.1.0 + rev: 7.0.0 hooks: - id: flake8 args: - "--config=setup.cfg" - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: requirements-txt-fixer files: requirements/.*\.txt$ @@ -42,7 +42,7 @@ repos: - id: detect-private-key - repo: https://github.com/adrienverge/yamllint - rev: v1.32.0 + rev: v1.33.0 hooks: - id: yamllint args: diff --git a/edc_model/models/base_model.py b/edc_model/models/base_model.py index 000f25c..c6805da 100644 --- a/edc_model/models/base_model.py +++ b/edc_model/models/base_model.py @@ -5,7 +5,6 @@ class BaseModel(UrlModelMixin, AuditModelMixin, models.Model): - """Base model class for all EDC models. Adds created and modified' values for user, date and hostname (computer). """ diff --git a/edc_model/models/fields/date_estimated.py b/edc_model/models/fields/date_estimated.py index 8d2c657..5b14b8a 100644 --- a/edc_model/models/fields/date_estimated.py +++ b/edc_model/models/fields/date_estimated.py @@ -5,7 +5,6 @@ class IsDateEstimatedField(CharField): - """field to question if date is estimated""" description = _("Custom field to question if date is estimated") @@ -28,7 +27,6 @@ def get_internal_type(self): class IsDateEstimatedFieldNa(CharField): - """field to question if date is estimated""" description = _("Custom field to question if date is estimated") diff --git a/edc_model/models/fields/identity_type_field.py b/edc_model/models/fields/identity_type_field.py index f8648ba..6a0bdda 100644 --- a/edc_model/models/fields/identity_type_field.py +++ b/edc_model/models/fields/identity_type_field.py @@ -4,7 +4,6 @@ class IdentityTypeField(CharField): - """ have IdentityTypeField immediately follow an identity field: diff --git a/edc_model/stubs.py b/edc_model/stubs.py index e154e95..8c1b9f3 100644 --- a/edc_model/stubs.py +++ b/edc_model/stubs.py @@ -13,8 +13,7 @@ class ModelMetaStub(Protocol): app_label: str model_name: str - def get_fields(self) -> list: - ... + def get_fields(self) -> list: ... class BaseUuidModelStub(AuditModelStub, Protocol): @@ -22,8 +21,7 @@ class BaseUuidModelStub(AuditModelStub, Protocol): admin_url_name: str admin_site_name: str - def get_absolute_url(self) -> str: - ... + def get_absolute_url(self) -> str: ... objects: models.Manager _meta: ModelMetaStub @@ -39,8 +37,7 @@ class BaseUuidHistoryModelStub(AuditModelStub, Protocol): admin_url_name: str admin_site_name: str - def get_absolute_url(self) -> str: - ... + def get_absolute_url(self) -> str: ... objects: models.Manager history: models.Manager diff --git a/edc_model/widgets/slider_widget.py b/edc_model/widgets/slider_widget.py index ccaf33d..c6a57d3 100644 --- a/edc_model/widgets/slider_widget.py +++ b/edc_model/widgets/slider_widget.py @@ -2,7 +2,6 @@ class SliderWidget(Input): - """ class HtnMedicationAdherenceForm(CrfModelFormMixin, forms.ModelForm): form_validator_cls = HtnMedicationAdherenceFormValidator diff --git a/setup.cfg b/setup.cfg index 66f498e..de2df7d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,7 +35,7 @@ exclude = edc_ltfu.tests* [flake8] -ignore = E226,W503,E203 +ignore = E226,W503,E203,E701,E704 max-line-length = 95 max-complexity = 10 exclude = */migrations/*,.tox,.git,__pycache__,build,dist,.eggs