Skip to content

Commit

Permalink
Bump pre-commit repos, run through Black 24.1.1
Browse files Browse the repository at this point in the history
Black changes witnessed (mainly) include:
- addition of blank line between module docstrings and imports
- removal of blank lines between class declarations and docstrings
- prefer splitting assignment statements on right-hand side
- wrap conditional expressions that span multiple lines in parens
  • Loading branch information
JonathanWillitts committed Feb 2, 2024
1 parent 8bd3ee6 commit fda4aea
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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$
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@


class StudyMedicationCrfModelMixin(PreviousNextModelMixin, StudyMedicationRefillModelMixin):

"""Declare with field subject_visit using a CRF model mixin"""

def save(self, *args, **kwargs):
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/models/dosage_guideline.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def get_by_natural_key(self, medication_name, dose, dose_units, dose_per_kg):


class DosageGuideline(BaseUuidModel):

"""Dosage guidelines."""

medication = models.ForeignKey(Medication, on_delete=PROTECT, null=True, blank=False)
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/models/rx.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class Rx(
SearchSlugModelMixin,
BaseUuidModel,
):

"""A model for the prescription.
In this context the `prescription` specifies only the medication.
Expand Down

0 comments on commit fda4aea

Please sign in to comment.