Skip to content

Commit

Permalink
chore: adhere to black formatting. Add pre-commit hook config to avoi…
Browse files Browse the repository at this point in the history
…d pushing bad commits.
  • Loading branch information
ecederstrand committed May 25, 2022
1 parent 18b0c65 commit d617875
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 6 deletions.
38 changes: 38 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v1.2.0
hooks:
- id: conventional-pre-commit
stages: [ commit-msg ]
args: [ ] # optional: list of Conventional Commits types to allow
- repo: local
hooks:
- id: black
name: black
stages: [ commit ]
entry: black --check --diff
language: system
types: [ python ]
- id: isort
name: isort
stages: [ commit ]
entry: isort --check --diff
types: [ python ]
language: system
always_run: true
- id: flake8
name: flake8
stages: [ commit ]
entry: flake8
types: [ python ]
language: system
always_run: true
14 changes: 8 additions & 6 deletions exchangelib/items/calendar_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,14 @@ class BaseMeetingReplyItem(BaseItem, metaclass=EWSMeta):
def send(self, message_disposition=SEND_AND_SAVE_COPY):
from ..services import CreateItem

res = list(CreateItem(account=self.account).call(
items=[self],
folder=self.folder,
message_disposition=message_disposition,
send_meeting_invitations=SEND_TO_NONE,
))
res = list(
CreateItem(account=self.account).call(
items=[self],
folder=self.folder,
message_disposition=message_disposition,
send_meeting_invitations=SEND_TO_NONE,
)
)
for r in res:
if isinstance(r, Exception):
raise r
Expand Down

0 comments on commit d617875

Please sign in to comment.