From a1efaf91a2fac3cc2110fa4f1c2927982763cd58 Mon Sep 17 00:00:00 2001 From: donhui <977675308@qq.com> Date: Wed, 8 Mar 2023 22:21:19 +0800 Subject: [PATCH] add .pep8speaks.yml --- .pep8speaks.yml | 28 ++++++++++++++++++++++++++++ xray/components.py | 2 -- xray/issues.py | 1 - xray/system.py | 1 - 4 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 .pep8speaks.yml diff --git a/.pep8speaks.yml b/.pep8speaks.yml new file mode 100644 index 0000000..e23ff42 --- /dev/null +++ b/.pep8speaks.yml @@ -0,0 +1,28 @@ +# File : .pep8speaks.yml + +scanner: + diff_only: True # If False, the entire file touched by the Pull Request is scanned for errors. If True, only the diff is scanned. + linter: pycodestyle # Other option is flake8 + +pycodestyle: # Same as scanner.linter value. Other option is flake8 + max-line-length: 120 # Default is 79 in PEP 8 + ignore: # Errors and warnings to ignore + - W504 # line break after binary operator + - E402 # module level import not at top of file + - E731 # do not assign a lambda expression, use a def + - C406 # Unnecessary list literal - rewrite as a dict literal. + - E741 # ambiguous variable name + +no_blank_comment: True # If True, no comment is made on PR without any errors. +descending_issues_order: False # If True, PEP 8 issues in message will be displayed in descending order of line numbers in the file + +message: # Customize the comment made by the bot + opened: # Messages when a new PR is submitted + header: "Hello @{name}! Thanks for opening this PR. " + # The keyword {name} is converted into the author's username + footer: "Do see the [Hitchhiker's guide to code style](https://goo.gl/hqbW4r)" + # The messages can be written as they would over GitHub + updated: # Messages when new commits are added to the PR + header: "Hello @{name}! Thanks for updating this PR. " + footer: "" # Why to comment the link to the style guide everytime? :) + no_errors: "There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: " diff --git a/xray/components.py b/xray/components.py index 4ee9486..408c359 100644 --- a/xray/components.py +++ b/xray/components.py @@ -155,5 +155,3 @@ def export_component_details(self): :return: """ pass - - diff --git a/xray/issues.py b/xray/issues.py index 0bce859..87b4b9f 100644 --- a/xray/issues.py +++ b/xray/issues.py @@ -140,4 +140,3 @@ def get_issue_event(self, issue_id: str, api_version='v1'): url ) return response - diff --git a/xray/system.py b/xray/system.py index 33e2213..e8aad74 100644 --- a/xray/system.py +++ b/xray/system.py @@ -78,4 +78,3 @@ def send_ping(self): url ) return response -