Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check UI files with custom widgets #3

Open
Gustry opened this issue Nov 29, 2021 · 2 comments
Open

Check UI files with custom widgets #3

Gustry opened this issue Nov 29, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@Gustry
Copy link

Gustry commented Nov 29, 2021

It can be nice to check how custom widgets in UI file are imported.

The UI file must contain a block like :

  <customwidget>
   <class>QgsMapLayerComboBox</class>
   <extends>QComboBox</extends>
   <header>qgis.gui</header>
  </customwidget>

It's wrong if the extends contains .h.

CF https://github.com/3liz/lizmap-plugin/blob/master/lizmap/test/test_code_layout.py#L26..L37

@Gustry Gustry added the enhancement New feature or request label Nov 29, 2021
@Joonalai
Copy link
Contributor

Than you for the great idea! We will try to implement this soon.

@Joonalai
Copy link
Contributor

Joonalai commented Dec 7, 2021

Unfortunately, since ui files are not python files, flake8 is not a right tool to lint them. Maybe there should be another tool that can be used as a pre-commit hook to enable this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants