Thank you so much Tycho for your in depth explanation. I like that comment
"I it ain't broke, don't fix it" ;)

Justine

On Thu, 30 Sep 2021, 23:12 Tycho Andersen, <[email protected]> wrote:

> On Thu, Sep 30, 2021 at 01:56:27PM -0700, Justine Smithies wrote:
> >  My Qtile seems to be running as expected but i just ran qtile check and
> > got 11 errors which I cannot seem to see what's wrong in my config.py
> > Would someone kindly take a peek at my config and see if it's anything
> to
> > worry about and or explain what I need to change and why ???
>
> I think in general "if it ain't broke don't fix it", but,
>
> > config.py
> > <
> https://github.com/justinesmithies/qtile-dotfiles/blob/master/.config/qtile/config.py
> >
> >
> >
> > checking qtile config file /home/justine/.config/qtile/config.py
> > tmp/tmpe670miy_/config.py:372: error: Argument 1 to "Group" has
> > incompatible type "object"; expected "str"
> > tmp/tmpe670miy_/config.py:372: error: Argument "matches" to "Group" has
> > incompatible type "object"; expected "Optional[List[Match]]"
>
> For these, they are from lines like,
>
>
>
> workspaces = [
>     {"name": " ₁", "key": "1", "matches": [Match(wm_class='firefox')]},
>     {"name": " ₂", "key": "2", "matches": [Match(wm_class='kitty'),
> Match(wm_class='ranger')]},
>     ...
> ]
>
> ...
>
> groups.append(Group(workspace["name"], matches=matches,
> layout="monadtall"))
>
> mypy unifies to a type of dict[str, object] for this, because some values
> have
> type str, and some things resolve to List[Match]. That is, mypy can't see
> past
> heterogeneous dictionaries.
>
> That's fine, but it will result in these kinds of errors (and potentially
> runtime errors if you use workspace["name"] where you mean
> workspace["matches"], etc).
>
> > tmp/tmpe670miy_/config.py:373: error: Argument 2 to "Key" has
> incompatible
> > type "object"; expected "str"
> > tmp/tmpe670miy_/config.py:373: error: Invalid index type "object" for
> > "InteractiveCommandClient"; expected type "Union[str, int]"
> > tmp/tmpe670miy_/config.py:374: error: Argument 2 to "Key" has
> incompatible
> > type "object"; expected "str"
>
> seems like the same here.
>
> > tmp/tmpe670miy_/config.py:390: error: Argument 1 to "Floating" has
> > incompatible type "**Dict[str, object]"; expected "Optional[List[Match]]"
>
> This seems like the bug that has been reported a lot:
> https://github.com/qtile/qtile/issues/2827
>
> > tmp/tmpe670miy_/config.py:417: error: Item "None" of "Optional[Any]" has
> no
> > attribute "cmd_spawn"
> > tmp/tmpe670miy_/config.py:437: error: Item "None" of "Optional[Any]" has
> no
> > attribute "cmd_spawn"
> > tmp/tmpe670miy_/config.py:439: error: Item "None" of "Optional[Any]" has
> no
> > attribute "cmd_spawn"
> > tmp/tmpe670miy_/config.py:441: error: Item "None" of "Optional[Any]" has
> no
> > attribute "cmd_spawn"
> > tmp/tmpe670miy_/config.py:443: error: Item "None" of "Optional[Any]" has
> no
> > attribute "cmd_spawn"
>
> This seems like it is just a bug with qtile check that I couldn't figure
> out
> how to fix:
> https://github.com/qtile/qtile/issues/2274#issuecomment-789332666
>
> Tycho
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "qtile-dev" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/qtile-dev/rfQk9ovvuUw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/qtile-dev/YVY2TAAhbBDE%2B2nv%40cisco.
>

-- 
You received this message because you are subscribed to the Google Groups 
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qtile-dev/CADrRWNaAgDRS2k37QuV-gjoEAcDzXzht6RrUXsbxbA-qbzmauA%40mail.gmail.com.

Reply via email to