Skip to content

Commit

Permalink
Introduced Linting (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
coldsofttech authored Apr 8, 2024
1 parent b5095d5 commit 62e856f
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 120
exclude = .git,__pycache__,venv
35 changes: 33 additions & 2 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,46 @@ on:
- '*'

jobs:
lint:
name: Python Linux (flake8)
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Run Lint
run: flake8 --verbose --color auto --count --statistics --format=json --output-file=flake8-report.json || echo "::set-output name=flake8_failed::true"
continue-on-error: true

- name: Upload Report
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: flake8-report
path: flake8-report.json

build_and_test:
name: Build and Test
runs-on: windows-latest
needs: lint

steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ on:

jobs:
release_windows:
name: Release for Windows
permissions: write-all
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down Expand Up @@ -53,15 +54,16 @@ jobs:
Invoke-RestMethod -Uri "https://api.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}" -Method Patch -ContentType "application/json" -Headers $header -Body $json
release_ubuntu:
name: Release for Ubuntu
permissions: write-all
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down Expand Up @@ -95,15 +97,16 @@ jobs:
"https://api.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}"
release_rhel:
name: Release for Linux
permissions: write-all
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down
4 changes: 2 additions & 2 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Constants:
"""This class holds all the constant values used in the application"""

APP_TITLE = 'M3U8 Downloader' # Title of the application
APP_VERSION = '0.1.0' # Version of the application
APP_VERSION = '0.1.1' # Version of the application
APP_WINDOW_WIDTH = 450 # Width of the application window
APP_WINDOW_HEIGHT = 250 # Height of the application window
APP_PALETTE_BACKGROUND = '#FFFFFF' # Background color of the application
Expand Down Expand Up @@ -475,7 +475,7 @@ def _open_license(self, event) -> None:

def main():
root = tk.Tk()
app = M3U8DownloaderUI(root)
M3U8DownloaderUI(root)
root.mainloop()


Expand Down

0 comments on commit 62e856f

Please sign in to comment.