- Feb 24, 2019
-
-
Romain Bignon authored
-
- Jul 09, 2017
-
-
hydrargyrum authored
-
- Jun 19, 2017
-
-
hydrargyrum authored
With: futurize -w -1 weboob
-
- Jan 25, 2017
-
-
Since Python 2.7 is the minimum version supported, collections.OrderedDict is guaranteed to exist and there is no need to reimplement it.
-
- Feb 11, 2016
-
-
Simon Lipp authored
Signed-off-by: Simon Lipp <laiquo@hwold.net>
-
- Dec 18, 2014
-
-
Bezleputh authored
-
- Oct 10, 2014
-
-
Laurent Bachelier authored
flake8 --select W391,E302,E301,E304 autopep8 can't fix W391 even though it claims it can. Fixed using a simple custom script.
-
- Sep 26, 2014
-
-
Florent authored
-
- Jul 09, 2014
-
-
Florent authored
-
- Jul 05, 2014
-
-
Romain Bignon authored
-
Romain Bignon authored
-
- Jun 23, 2014
-
-
- Nov 08, 2012
-
-
Also call the init of CapBaseObject. This should have been done previously, though the usage of id=None isn't ideal. Maybe it should be split_path.
-
- Apr 25, 2012
-
-
Romain Bignon authored
Modules can raise this exception when they want to print errors to user
-
- Mar 13, 2012
-
-
Laurent Bachelier authored
Don't force objects to have an id, especially since that id was incorrect. "plap/plop" would have the same id as "plop", i.e. "plop". We don't rely on the id for handling Collections anymore. Change to use more unique property names. Change the display, instead of using '*', we use '~', and there is no "Collection" header anymore. Updated formatters could use that way of showing the object is also a collection too. refs #774
-
Laurent Bachelier authored
-
Laurent Bachelier authored
And add restrict_level helper method.
-
Laurent Bachelier authored
Handle and use exceptions. An example is provided with the redmine backend (not very useful though). If you cd into the project title instead of the id, it is accepted and the path is corrected.
-
Laurent Bachelier authored
* Create a get_collection method similar to get_* methods for objects. * Fix title initialization of a collection * Remove the hack were both id and title were allowed when CDing. That hack only worked with the canalplus module, and failed with others like redmine (but they still showed in suggestions). Moreover, the canalplus module now has friendlier IDs so this is not really needed anymore. * Allow backends to tell if a path is valid or not. For instance, it now allows to cd in a Redmine project with no issues in it. It also won't display "404" for invalid project IDs. By default, we still use the unreliable method of checking there is at least one result in iter_resources(). * Fix cd completion to work with unicode strings (all strings after an unicode string were ignored!) * Do not suggest '..' when completing cd in the root refs #774
-
Laurent Bachelier authored
* Remove callbacks in Collection object Make Collection a "dumb" object (and also a base object, though it isn't very useful for now) * Rename Path to WorkingPath, because it is more about managing state than being a single path. * Rewrite almost all WorkingPath, because the code was overly complicated for no reason (I tried some special cases and it turned out that fromstring didn't handle them, and that the quote-escape-unquote was just unecessary). I also rewrote it to be more pythonic (no more lambdas and maps) and added tests. * Require the full split path when creating a Collection. Because, come to think of it, an object needs an unique identifier; in the case of Collections, it is the full path, not only its last part. I might even replace the id by the full split path in the future. * There is now only one way to get items of a Collection: calling iter_resources(). * Rewrite flatten_resources to iter_resources_flat(), which just calls iter_resources() recursively. * Rewrite the collection part of the canalplus module. There is no more callback or a page calling the browser to check another page! The logic is only in iter_resources(). The resulting code is not very pretty, but it should get better. As a bonus, avoid to reload the main XML file when we already have it open. * change_path() now expects a split path and not a string. * up/home special cases for "cd" are handled in the same place, and store the previous place properly (but are not yet exploitable by an user command). This is a big commit but it would be hard to split it in *working* commits. If you read this entire commit message, I will buy you a beer. refs #774 fixes #773
-
- Feb 12, 2012
-
-
Laurent Bachelier authored
Collections are not stored in replapplication.objects anymore, but in replapplication.collections. This fixes the IDs issue. There was no gain from storing them in objects. Completion right after cd should be faster (and should always have been like that, it was pretty much a bug). The display of do_ls() should be much clearer. Collections are always at the end, have ids/title/backend like objects (but using a formatter would be better than my current hack). There are still many issues with the current implementation. refs #774 closes #785
-
- Feb 05, 2012
-
-
Laurent Bachelier authored
-
- Feb 02, 2012
-
-
Laurent Bachelier authored
* Make the declaration of fct and it in the constructor Collection, instead of adding them from the outside * Add a function to flatten a list containing collection (solves the radioob search crash) * Better display of collections in the "ls" command (and display both id and title) * The "cd" command goes to the root of the path (like the UNIX cd) * Move the Video object of canalplus in a correct path * Make Collection iterable * Add comments to CapCollection * Cache the result of fct in a Collection; it is only called once * CollectionNotFound errors can be more explicit by providing a path * Require utf-8 in collection paths * Code cleanups
-
Laurent Bachelier authored
-
- Apr 21, 2011
-
-
Romain Bignon authored
-
- Apr 20, 2011
-
-
Nicolas Duhamel authored
-
Nicolas Duhamel authored
-
Nicolas Duhamel authored
-