PyCharm extract method made strange thing