Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

brain_mechanize.py 712B

1234567891011121314151617181920212223
  1. # Copyright (c) 2015-2016 Claudiu Popa <pcmanticore@gmail.com>
  2. # Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
  3. # For details: https://github.com/PyCQA/astroid/blob/master/COPYING.LESSER
  4. from astroid import MANAGER, register_module_extender
  5. from astroid.builder import AstroidBuilder
  6. def mechanize_transform():
  7. return AstroidBuilder(MANAGER).string_build('''
  8. class Browser(object):
  9. def open(self, url, data=None, timeout=None):
  10. return None
  11. def open_novisit(self, url, data=None, timeout=None):
  12. return None
  13. def open_local_file(self, filename):
  14. return None
  15. ''')
  16. register_module_extender(MANAGER, 'mechanize', mechanize_transform)