Fix PEP8 code lints not related to max line length
This commit is contained in:
parent
dd7340552d
commit
507b9dc67e
|
@ -9,12 +9,13 @@ def get_user_info():
|
|||
for contributor in r:
|
||||
get_user_commits(contributor['login'], contributor['url'])
|
||||
|
||||
|
||||
def get_user_commits(login, github_profile):
|
||||
URL = "https://api.github.com/repos/realaltffour/GraphSolver/commits"
|
||||
# Filter by login
|
||||
r = requests.get(URL, {'author':login})
|
||||
r = requests.get(URL, {'author': login})
|
||||
r = r.json()
|
||||
|
||||
|
||||
with open('CONTRIBUTORS.md', 'a') as contributor_file:
|
||||
counter = 0
|
||||
for commits_by_user in r:
|
||||
|
@ -23,4 +24,5 @@ def get_user_commits(login, github_profile):
|
|||
|
||||
contributor_file.close()
|
||||
|
||||
|
||||
get_user_info()
|
||||
|
|
|
@ -1 +1 @@
|
|||
#THIS FILE IS JUST FOR TESTING SOME PRERELEASED FEUTURES DO NOT USE IN APP.PY!
|
||||
# THIS FILE IS JUST FOR TESTING SOME PRERELEASED FEUTURES DO NOT USE IN APP.PY!
|
||||
|
|
|
@ -3,48 +3,49 @@ from PyQt5.QtGui import *
|
|||
from PyQt5.QtCore import *
|
||||
from matplotlib.pyplot import *
|
||||
import numpy as np
|
||||
import sys
|
||||
import sys
|
||||
|
||||
|
||||
class Window_linear(QWidget):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
self.setWindowTitle("Linear Solver")
|
||||
self.setGeometry(50,50,500,500)
|
||||
self.setGeometry(50, 50, 500, 500)
|
||||
self.setWindowIcon(QIcon('.\icons\bar-graph-on-a-rectangle.png'))
|
||||
self.setupUi()
|
||||
|
||||
def setupUi(self):
|
||||
#text boxes
|
||||
# text boxes
|
||||
self.m_textbox = QLineEdit(self)
|
||||
self.m_textbox.move(100,300)
|
||||
|
||||
self.m_textbox.move(100, 300)
|
||||
|
||||
self.c_textbox = QLineEdit(self)
|
||||
self.c_textbox.move(100,350)
|
||||
#button
|
||||
self.calc_button = QPushButton('Calculate',self)
|
||||
self.calc_button.move(300,350)
|
||||
self.c_textbox.move(100, 350)
|
||||
# button
|
||||
self.calc_button = QPushButton('Calculate', self)
|
||||
self.calc_button.move(300, 350)
|
||||
self.calc_button.clicked.connect(self.input_usage)
|
||||
#font
|
||||
# font
|
||||
font = QFont()
|
||||
font.setPointSize(14)
|
||||
#label
|
||||
# label
|
||||
self.m_label = QLabel(self)
|
||||
self.m_label.setText("M:")
|
||||
self.m_label.move(50,300)
|
||||
self.m_label.move(50, 300)
|
||||
self.m_label.setFont(font)
|
||||
|
||||
self.c_label = QLabel(self)
|
||||
self.c_label.setText("C:")
|
||||
self.c_label.move(50,350)
|
||||
self.c_label.move(50, 350)
|
||||
self.c_label.setFont(font)
|
||||
self.show()
|
||||
|
||||
|
||||
def input_usage(self):
|
||||
|
||||
m_input = int(self.m_textbox.text())
|
||||
c_input = int(self.c_textbox.text())
|
||||
|
||||
c_input = int(self.c_textbox.text())
|
||||
|
||||
def graph(self):
|
||||
pass
|
||||
|
||||
|
@ -52,10 +53,12 @@ class Window_linear(QWidget):
|
|||
result = [(0-length, a*(0 - length)), (0-length, a*length)]
|
||||
return result
|
||||
|
||||
|
||||
def main():
|
||||
app = QApplication(sys.argv)
|
||||
window_linear = Window_linear()
|
||||
sys.exit(app.exec_())
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
25
gui/main.py
25
gui/main.py
|
@ -4,44 +4,47 @@ from PyQt5.QtCore import *
|
|||
from matplotlib.pyplot import *
|
||||
from linear import *
|
||||
import numpy as np
|
||||
import sys
|
||||
import sys
|
||||
|
||||
|
||||
class Window(QWidget):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
self.setWindowTitle("Graph Solver")
|
||||
self.setGeometry(50,50,500,500)
|
||||
self.setGeometry(50, 50, 500, 500)
|
||||
self.setWindowIcon(QIcon('.\icons\window_icon.png'))
|
||||
self.Ui()
|
||||
|
||||
def Ui(self):
|
||||
#font
|
||||
# font
|
||||
font = QFont()
|
||||
font.setPointSize(16)
|
||||
#combo box
|
||||
# combo box
|
||||
self.combo_box = QComboBox(self)
|
||||
self.combo_box.setGeometry(QRect(105,200,300,50))
|
||||
self.combo_box.setGeometry(QRect(105, 200, 300, 50))
|
||||
self.combo_box.addItem("Linear")
|
||||
self.combo_box.addItem("Linear Intersect")
|
||||
self.combo_box.setFont(font)
|
||||
#button
|
||||
self.run_button = QPushButton('Run',self)
|
||||
self.run_button.setGeometry(QRect(105,375,250,50))
|
||||
# button
|
||||
self.run_button = QPushButton('Run', self)
|
||||
self.run_button.setGeometry(QRect(105, 375, 250, 50))
|
||||
self.run_button.setFont(font)
|
||||
self.run_button.clicked.connect(self.window_starter)
|
||||
self.show()
|
||||
|
||||
|
||||
def window_starter(self):
|
||||
self.window = QMainWindow()
|
||||
self.ui = Window_linear()
|
||||
self.ui.setupUi(self.window)
|
||||
self.window.show()
|
||||
|
||||
|
||||
def main():
|
||||
app = QApplication(sys.argv)
|
||||
window_one = Window()
|
||||
sys.exit(app.exec_())
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
main()
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import math
|
||||
|
||||
|
||||
class Linear:
|
||||
|
||||
def __init__(self, a, c, length):
|
||||
|
@ -28,4 +29,4 @@ class Linear:
|
|||
x = (line.c-self.c)/(self.a - line.a)
|
||||
y = self.a*(line.c - self.c)/(self.a - line.a) + self.c
|
||||
|
||||
return (x, y)
|
||||
return (x, y)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import math
|
||||
|
||||
|
||||
def calcLinearIntersection(line1, line2):
|
||||
"""
|
||||
This function accepts two lines of Linear class
|
||||
|
|
Loading…
Reference in New Issue