Learning class in python, using below github(https://github.com/gurupratap-matharu/Bike-Rental-System), I cloned it and I try to add database class. I did it and it works. But I don't think I did it correctly (pythonically or object oriented correctly). Can someone please do a code review? ( https://github.com/isolveditalready/PLAYGROUND ) I am espescailly not sure if using another class's variable in another class( in dbAction.py, line 15)
Basically, I needed to access another class's variable(From class BikeRental class, variable named stock) from dbActionMe class and I didn't know how so I just passed that variable into dbActionMe class. If code review is not possible, can someone please review below to see what I could have done differently?
db = dbActionMe()
numOfBikes = db.dbRead()
shop = BikeRental(numOfBikes)
customer = Customer()
...
db.dbUpdate(shop.stock)