A hangover from the previous DirectoryTree, where setting the path didn't
matter. This now sets it *after* calling Tree's __init__, thus ensuring the
line cache and other related things have been created.
Until now it wasn't really possible to know *which* DirectoryTree widget had
sent a given message; this makes it available by providing the `node`, which
in turn will provide the `tree`.
A couple of things come with this, at least one being a breaking change of
sorts:
- DirectoryTree now has a path attribute
- DirectoryTree.path is a reactive
- When DirectoryTree.path is assigned to it rebuilds the tree content
- DirectoryTree.path can be assigned a str or Path but always evaluates to a Path
- DirEntry.path is now typed as a Path
- DirEntry drops is_dir (Directory.path.is_dir() does that job)
- DirectoryTree.FileSelected.path is now always a Path
This is the first of what might be a few changes here; the main thrust of
this commit being to allow changing a DirectoryTree to view a different
directory, and also to move to a Path-first approach.
* Export types used in app.py
* Export more linked types/errors/classes.
* Remove custom template.
* Address review comments.
We need to have explicit 'Returns:' sections in properties if we want to link to the return type while https://github.com/mkdocstrings/python/issues/65 is open.
* Improve docs.
In doing so this removes the file similarity value, and as such the key that
the failure report was sorted on. This was done because, given how many
snapshot tests we have now, if lots failed, it would take a long time (often
many minutes) to compile the report.
The report is now sorted on the test name.
Now, no matter how many snapshots fail, the report should be produced pretty
much instantly.
This is a series of tests for checking styles that have sub-styles, or
sub-parts, or whatever the correct name would be; the testing being that if
!important is applied to the whole, that it works.
Starting with #2420 it became apparent that this didn't work as intended,
and once that work started it became obvious that it affected more than just
border.
So these tests test all of the styles that can be specified as a single
whole, or as a set of parts (sides, directions, etc).