Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

.qmllint.ini not working #326

@bambier

Description

@bambier

Describe the Bug
It seems it doesn't respect .qmllint.ini file

To Reproduce Steps to reproduce the behavior:

  1. Install it
  2. create .qmllint.ini
  3. not working! 😑

Expected Behavior Not showing warnings and errors

Screenshots

image

Environment

  • OS: Ubuntu 24.04 LTS
  • Visual Studio Code version: 1.91.1
  • PySide version: 6.7.2
  • Python version: 3.12.3

Extension Configurations
Nothing
Additional context

This is my project structure (Controller directory was made after running pyside6-project run)

.
├── app
│   ├── accounting.pyproject
│   ├── assets
│   │   ├── fonts
│   │   │   ├── fontawesome
│   │   │   │   ├── FontAwesome-Brands.otf
│   │   │   │   ├── FontAwesome-Regular.otf
│   │   │   │   └── FontAwesome-Solid.otf
│   │   │   ├── material
│   │   │   │   ├── MaterialSymbolsOutlined.ttf
│   │   │   │   ├── MaterialSymbolsRounded.ttf
│   │   │   │   └── MaterialSymbolsSharp.ttf
│   │   │   └── vazirmatn
│   │   │       ├── Vazirmatn-UI-FD-NL-Black.ttf
│   │   │       ├── Vazirmatn-UI-FD-NL-Bold.ttf
│   │   │       ├── Vazirmatn-UI-FD-NL-ExtraBold.ttf
│   │   │       ├── Vazirmatn-UI-FD-NL-ExtraLight.ttf
│   │   │       ├── Vazirmatn-UI-FD-NL-Light.ttf
│   │   │       ├── Vazirmatn-UI-FD-NL-Medium.ttf
│   │   │       ├── Vazirmatn-UI-FD-NL-Regular.ttf
│   │   │       ├── Vazirmatn-UI-FD-NL-SemiBold.ttf
│   │   │       └── Vazirmatn-UI-FD-NL-Thin.ttf
│   │   └── imgs
│   │       ├── icon.ico
│   │       └── icon.png
│   ├── controlers
│   │   ├── __init__.py
│   │   └── LabeledIconButton.py
│   ├── Controllers
│   │   └── LabeledIconButton
│   │       ├── LabeledIconButtonmetatypes.json
│   │       ├── LabeledIconButton_qmltyperegistrations.cpp
│   │       ├── LabeledIconButton.qmltypes
│   │       └── qmldir
│   ├── main.py
│   ├── qml
│   │   ├── components
│   │   │   ├── Card.qml
│   │   │   └── LabeledIconButton.qml
│   │   ├── main.qml
│   │   └── sections
│   │       └── Header.qml
│   ├── qtquickcontrols2.conf
│   ├── resource.qrc
│   ├── resource_rc.py
│   └── utils
│       ├── __init__.py
│       ├── settings.py
│       └── shortcuts.py
├── LICENCE
├── README.md
└── requirements.txt

15 directories, 38 files

This is my .qmllint.ini file:

[General]
DisableDefaultImports=false
OverwriteImportTypes=
ResourcePath=app/resource.qrc
AdditionalQmlImportPaths=app/Controllers/
AdditionalQmlImportPaths=app/Controllers/LabeledIconButton

[Warnings]
BadSignalHandler=warning
TypeError=warning
UnknownProperty=warning
ImportFailure=warning
ReadOnlyProperty=warning
BadSignalHandlerParameters=warning
UnusedImports=warning
DuplicatedName=warning
PrefixedImportType=warning
AccessSingletonViaObject=warning
Deprecated=warning
ControlsSanity=warning
UnresolvedType=warning
LintPluginWarnings=warning
MultilineStrings=warning
RestrictedType=warning
PropertyAliasCycles=warning
VarUsedBeforeDeclaration=warning
AttachedPropertyReuse=warning
RequiredProperty=warning
WithStatement=warning
InheritanceCycle=warning
UnqualifiedAccess=warning
UncreatableType=warning
MissingProperty=warning
InvalidLintDirective=warning
CompilerWarnings=warning
UseProperFunction=warning
NonListProperty=warninig
IncompatibleType=warning
TopLevelComponent=warning
MissingType=warning
DuplicatePropertyBinding=warning

My LabeledIconButton.py is defined as:

# app/controlers/LabeledIconButton.py
from PySide6.QtCore import QObject, Slot
from PySide6.QtQml import QmlElement

QML_IMPORT_NAME = "Controllers.LabeledIconButton"
QML_IMPORT_MAJOR_VERSION = 1


@QmlElement
class LabeledIconButton(QObject):

    @Slot(int, result=bool)
    def changeScreen(self, idx: int) -> bool:
        print("python: ", idx)

        return True

and registerd using

# app/controlers/__init__.py
from controlers.LabeledIconButton import LabeledIconButton
from PySide6.QtQml import QQmlApplicationEngine

__all__ = [
    'LabeledIconButton',
    'register_controllers'
]


def register_controllers(engine: QQmlApplicationEngine) -> None:
    controller = LabeledIconButton()
    context = engine.rootContext()
    context.setContextProperty("controller", controller)

There is no problem when I run or compile codes but I don't know how to get rid of this warning it's really annoying

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions