Skip to content

Commit

Permalink
General code cleanup and refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Mar 13, 2024
1 parent 7919b19 commit 01195b2
Show file tree
Hide file tree
Showing 14 changed files with 435 additions and 458 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
name: Windows
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
Expand All @@ -24,7 +24,7 @@ jobs:
- name: Build binary
run: pyinstaller CurseBreaker.spec
- name: Upload binary
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Windows
path: dist/CurseBreaker.exe
Expand All @@ -33,8 +33,8 @@ jobs:
name: Linux
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Build binary
run: pyinstaller CurseBreaker.spec
- name: Upload binary
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Linux
path: dist/CurseBreaker
Expand All @@ -54,8 +54,8 @@ jobs:
name: macOS
runs-on: macos-11
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
Expand All @@ -66,7 +66,7 @@ jobs:
- name: Build binary
run: pyinstaller CurseBreaker.spec
- name: Upload binary
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: macOS
path: dist/CurseBreaker
18 changes: 18 additions & 0 deletions .sourcery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '1'

ignore:
- CB\SLPP.py

rule_settings:
enable:
- default
disable:
- list-comprehension
- dict-comprehension
- for-append-to-extend
- use-next
rule_types:
- refactoring
- suggestion
- comment
python_version: '3.12'
4 changes: 2 additions & 2 deletions CB/Compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ def set_normal_term(self):
if system != 'Windows':
termios.tcsetattr(self.fd, termios.TCSAFLUSH, self.old_term)

def getch(self):
def getch(self): # sourcery skip: assign-if-exp
if system == 'Windows':
return msvcrt.getch()
else:
return sys.stdin.read(1)

def kbhit(self):
def kbhit(self): # sourcery skip: remove-unnecessary-else
if system == 'Windows':
return msvcrt.kbhit()
else:
Expand Down
Loading

0 comments on commit 01195b2

Please sign in to comment.