Skip to content

Commit

Permalink
- Fix errors found with pylint
Browse files Browse the repository at this point in the history
- Removed pip update from pylint workflow
- Removed unneeded functions
- Removed unused parameters in Task and List classes
  • Loading branch information
Wemmy0 committed Feb 12, 2024
1 parent 5f7129f commit e9452ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-4.0 python3-gi
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint mysql-connector-python pycairo PyGObject requests openai
- name: Analysing the code with pylint
run: |
Expand Down
4 changes: 2 additions & 2 deletions src/NoteView.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def save(self):


class List(Gtk.Box):
def __init__(self, data, read_only):
def __init__(self, data):
super().__init__(css_name="item-list", margin_start=5)
self.children = []
self.main = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
Expand Down Expand Up @@ -382,7 +382,7 @@ def save(self):


class Task(Gtk.Box):
def __init__(self, data, read_only):
def __init__(self, data):
super().__init__(css_name="item-list", margin_start=0)
self.children = []
self.main = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
Expand Down
10 changes: 2 additions & 8 deletions src/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def __init__(self, window, config, debug):
right_viewport = Gtk.Viewport()
right_window.set_child(right_viewport)

self.right_content = NoteView(self.config["elements"], self.config["AI-Configuration"], self.config["read-only"], self.header)
self.right_content = NoteView(self.config["elements"], self.config["AI-Configuration"],
self.config["read-only"], self.header)
right_viewport.set_child(self.right_content)

main_container.set_end_child(right_window)
Expand Down Expand Up @@ -237,10 +238,3 @@ def show_about_dialogue(*args):

def setup_new_note(self, file_viewer):
self.new_note_btn.connect("clicked", file_viewer.add_note)


def set_margins(widget, num):
widget.set_margin_start(num)
widget.set_margin_end(num)
widget.set_margin_top(num)
widget.set_margin_bottom(num)

0 comments on commit e9452ab

Please sign in to comment.