Skip to content

Commit

Permalink
fix: pre-commit issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkothari22 committed Mar 16, 2024
1 parent 7d3966d commit 751f1d0
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 4 deletions.
37 changes: 37 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[flake8]
ignore =
E121,
E126,
E127,
E128,
E203,
E225,
E226,
E231,
E241,
E251,
E261,
E265,
E302,
E303,
E305,
E402,
E501,
E741,
W291,
W292,
W293,
W391,
W503,
W504,
F403,
B007,
B950,
W191,
E124, # closing bracket, irritating while writing QB code
E131, # continuation line unaligned for hanging indent
E123, # closing bracket does not match indentation of opening bracket's line
E101, # ensured by use of black

max-line-length = 200
exclude=.github/helper/semgrep_rules
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ repos:
additional_dependencies: ["click==8.0.4"]

- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: ["flake8-bugbear"]
additional_dependencies: ["flake8-bugbear", "flake8-tuple"]
args: ["--config", ".github/helper/flake8.conf"]

- repo: https://github.com/PyCQA/isort
Expand Down
2 changes: 1 addition & 1 deletion raven/api/upload_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def upload_JPEG_wrt_EXIF(content, filename):
# get the value of the buffer
buffer = buffer.getvalue()
else:
buffer = decoded_content
buffer = base64.b64decode(content)

return frappe.get_doc(
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def before_validate(self):
self.is_direct_message = 1

if self.is_direct_message == 1:
self.type == "Private"
self.type = "Private"
if self.is_direct_message == 0:
self.channel_name = self.channel_name.strip().lower().replace(" ", "-")

Expand Down

0 comments on commit 751f1d0

Please sign in to comment.