Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
max-line-length = 88
select = B,C,E,F,W,T4,B9
ignore = E203, E221, E231, E266, E401, E402, E501, E711, E712, E722, E741, F403, F405, F812, F841, W503, W504, W605
exclude = jinja2,markupsafe,\.git.*,__pycache__,tests
30 changes: 30 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint # name of the action (displayed in the github interface)

on: # event list
pull_request: # on a pull request to each of these branches
branches:
- develop

jobs:
flake8_py3:
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
architecture: 'x64'
- name: Install dependencies
run: pip install lintly==0.6.0 flake8==3.9.2 black==21.9b0
- name: Install problem dependencies
run: pip install MarkupSafe==2.0.1 Jinja2==2.11.3
- name: Lint with flake8
run: flake8 | lintly --format=flake8
env:
LINTLY_API_KEY: ${{ secrets.GITHUB_TOKEN }}
- name: Lint with black
run: black . --check 2>&1 >/dev/null | lintly --format=black
env:
LINTLY_API_KEY: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions junk.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint # name of the action (displayed in the github interface)

on: # event list
pull_request: # on a pull request to each of these branches
branches:
- develop
paths:
- '*.py'

jobs:
flake8_py3:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Code Checkout
uses: actions/checkout@v2
- name: Install flake8
run: pip install flake8
- name: Run flake8
uses: suo/flake8-github-action@releases/v1
with:
checkName: 'flake8_py3'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class Main:
const1 = 1
CONST2 = 2

def __init__( self ):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E202: whitespace before ')'

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E201: whitespace after '('

print( "In Constructor")

def do_something(self):
print("Let's do something!" )
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E202: whitespace before ')'

if self.CONST2:
print("CONST2 is set")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E117: over-indented

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E111: indentation is not a multiple of 4

6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
flake8==4.0.1
Jinja2==2.11.3
MarkupSafe==2.0.1
mccabe==0.6.1
pycodestyle==2.8.0
pyflakes==2.4.0