codingwithbatista / coral-text-editor

A simple text editor written in python
MIT License
0 stars 0 forks source link

Refactoring Code Style - Object Oriented #3

Open codingwithbatista opened 4 years ago

codingwithbatista commented 4 years ago

Using class to organize software code style

Description

Refactoring code style to adjust the code to object oriented style. It's issue is justified by the fact that the initial coding was based on structural programming. Verified that OO Style can be better to working through the project growing.

Note

David-Billingsley commented 4 years ago

On a brief look threw of the code there is a few things that you could clean up. If you decide to follow PEP-8 there is a few changes to be made. I made a few comments below on parts that I found during a quick read.

if ((filePath is None) and (len(t) > 0)) Doesn't need the additional parentheses

root.geometry(); No semi-colon needed

if isEntry == False Could be written as: if not isEntry

numberOfLines = getNumberOfLines() Doesn't serve a purpose that I can see on a quick read.

I will be more then happy to help you with this project if you like.

Thank you