First I'm going to ask a generic question. What is your concern regarding the risk of diving and what your previous past medical history including lung surgery will affect or impact your ability to dive? More on a personal curiosity, what kind of advice are you looking for when posting medical questions to mostly lay people with no medical training?
--------------------------------------
Just as a disclaimer I actually am a board certified physician in primary care. Not to directly answer your specific question but more for educational and informative purposes I will review the medical recommendations for divers with lung surgery.
When a patient has lung surgery and the lung tissue itself and what is called the pleural space (basically the inside of the chest wall, the lung itself, and the adjacent linings on the chest wall and lung) is operated on then scar tissue forms as the incisions heal. The concern is that the scar tissue may create a fixed point referred to as an adhesion. Also, the scar tissue is more stiff than regular lung tissue and will not expand like normal lung. Both of these conditions may create a potential closed space at depth, then as the diver ascends and the gas expands it has nowhere to go and can create an overexpansion lung injury.
You will at minimum need to have formal lung function test measuring total lung capacity and volume. Depending on your age and risk factors it would not be unreasonable to have a cardiac stress test not for your heart but to document there are no physical restrictions for stamina and exertion after having a portion of your lung removed. And a high resolution CAT scan of the chest with specific thin cuts for the lung looking for scar tissue and potential problems.
Most diver candidates with prior history of lung surgery would be strongly discouraged against diving due to the potential risk. Although not absolute it is highly recommended that the person not dive.
For highly motivated diver candidates then they need full medical clearance from their doctor, hopefully one familiar with dive physiology and diving requirements. DAN can provide someone near your area. At very minimum you need to have very slow ascent rates and plan your dive accordingly.