aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Run `pyupgrade --py39-plus`Sam James2023-08-071-4/+2
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Fix flake F401 'imported but unused' errorWolfgang E. Sanyer2021-09-211-3/+0
| | | | | | Closes: https://github.com/gentoo/gentoolkit/pull/17 Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer@gmail.com> Signed-off-by: Matt Turner <mattst88@gentoo.org>
* Change tabs to spaces (using autopep8). Also, format repo using black.Wolfgang E. Sanyer2021-09-201-237/+255
| | | | | | | | | | | The following command was used to change the tabs to spaces: autopep8 --in-place --select=E101,E11,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E133,E20,E211,E22,E224,E224,E226,E227,E228,E231,E241,E242,E251,E252,E26,E265,E266,E27,E301,E302,E303,E304,E305,E306,W291,W293,W391 -r . And then black was run as `black .` on the entire tree Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer@gmail.com> Signed-off-by: Matt Turner <mattst88@gentoo.org>
* equery: Remove 'changes' subcommandMatt Turner2021-01-041-173/+0
| | | | | | | | | | ChangeLogs have been gone from gentoo.git since the beginning, and Council agreed in 2016 to allow Infra to decide whether to distribute them through rsync, which they have decided not to do [1]. [1] https://projects.gentoo.org/council/meeting-logs/20160410-summary.txt Signed-off-by: Matt Turner <mattst88@gentoo.org>
* Remove unused sys importsMatt Turner2020-12-201-1/+0
| | | | | | Reported by flake8. Signed-off-by: Matt Turner <mattst88@gentoo.org>
* Remove inherits from objectMatt Turner2020-12-201-2/+2
| | | | Signed-off-by: Matt Turner <mattst88@gentoo.org>
* Remove Python < 3 version checksMatt Turner2020-12-201-2/+0
| | | | Signed-off-by: Matt Turner <mattst88@gentoo.org>
* Remove $Header$Matt Turner2020-12-201-2/+0
| | | | Signed-off-by: Matt Turner <mattst88@gentoo.org>
* Pass raw strings for regexp to fix DeprecationWarningsMichał Górny2020-01-261-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Remove pylintVirgil Dupras2018-08-141-2/+0
| | | | | | | | | As of now, pylint checks return a metric ton of warnings, which tells us that it hasn't been running lately. pylint is replaced by flake8 and its continuous run will enventually be ensured by a CI running tox on this project. The immediate goal, for now, is to have an easy command that checks as much as possible, but that *passes* so that we don't litter the project with more code that decrease quality.
* Add (and fix) flake8 checks in toxVirgil Dupras2018-08-141-2/+2
| | | | | | | | | | | | | | Add config in tox to run flake8 checks. For now, only "F*" errors are checked (errors reported by pyflakes). pep8 style checks are ignored for now. This is accompanied by changes in the code that are necessary to silence these errors. Most of them were about unused imports, but also unsed referenced and even undefined ones (meaning that this code path was broken, gotta increase test coverage). This setup will replace pylint which reports way too many errors to be usable (see next commit).
* Add missing import of io.open when using python2.70.3.2-r1Paul Varner2016-07-251-0/+3
| | | | | | | This fixes the traceback when running equery changes with Python 2.7 X-Gentoo-bug: 589686 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=589686
* Change open function to use UTF-8 encoding for content.Paul Varner2016-06-301-1/+2
| | | | | | Uses io.open for Python 2 and built-in open for Python 3 All data from files is treated as Unicode and this should fix most UnicodeDecodeErrors.
* Fix the file open() calls to work with Python 2Paul Varner2015-11-241-3/+3
| | | | | The generalized file open call needs to look like: with open(_unicode_encode(path, encoding=_encodings['fs'])) as open_file
* Change all open() calls to use Unicode.Paul Varner2015-11-241-4/+4
| | | | | | | | | | | | | We are using the following import from portage: from portage import _encodings, _unicode_decode, _unicode_encode A generalized call using the definitions from portage looks like: with open(_unicode_encode(path), encoding=_encodings['fs']) as open_file The portage code has been in place since 2013 and using the definitions from portage ensures we maintain compatibility if portage changes. All portage versions in the tree contain the above code.
* Fix regular expression queries to work properly. (Bug 447406)Paul Varner2013-01-041-29/+23
| | | | | | | There were two issues in the code: 1. query.py was trying to treat regular expressions as CPVs 2. helpers.py get_cpv functions were applying the predicate to only the CPs and not all of the CPVs
* helpers: update entry counts and version range in ChangeLog doctestW. Trevor King2012-11-111-5/+4
|
* helpers: update package counts in get_cpvs doctestW. Trevor King2012-11-111-2/+2
|
* helpers: convert get_cpvs output to a set before calculating len()W. Trevor King2012-11-111-1/+1
| | | | This avoids "TypeError: object of type 'generator' has no len()".
* helpers: use print() in ChangeLog doctest for Python 3 compatibilityW. Trevor King2012-11-111-5/+6
| | | | Also update the expected portage.latest.
* helpers: remove unused "sys" importW. Trevor King2012-11-111-1/+0
| | | | | Pointed out by pylint: W0611: 29: Unused import sys
* helpers: change "p" -> "path" to avoid pylint C0103 (Invalid name "p")W. Trevor King2012-11-111-4/+4
|
* helpers: wrap long lines to avoid pylint C0301W. Trevor King2012-11-111-8/+25
|
* helpers: use grep instead of vim in FileOwner doctestW. Trevor King2012-11-111-2/+2
| | | | | | | grep is in the base profile so the tester is more likely to have it installed. The version may be off, but a test result with a different grep version is still obviously working. An empty result from an uninstalled file is not so comforting.
* replace all use of dbapi's PORTDB, VARDB, BINDB assigned variables with the ↵Brian Dolbec2012-07-311-10/+11
| | | | actuall portage calls to take advantage of all 3 being lazyloaded. The assignemt in dbapi causes all 3 to be loaded, slowing down runs that do not need all 3
* Do not index ChangeLog entries with an invalid CPV. (Bug 375293)Paul Varner2011-07-151-1/+1
|
* Fix extend_realpaths in FileOwner class. (Bug 96515)Paul Varner2011-03-311-1/+1
| | | | | | | Removed the os.path.islink check since it oly returns true if the last part of the path is a symbolic link. We want to add the realpath to the list if it already doesn't exist in the list, since that indicates that something in the path is a symbolic link.
* apply djanderson's idea for a simpler/better fix to bug 353430 and commit ↵Brian Dolbec2011-02-101-13/+1
| | | | | | 000ce49860b253ad6c917c5a58bc0ff31225134a for use conditionals causing errors in equery results.
* create a new uniqify_atoms() to properly handle a list of atom instances.Brian Dolbec2011-01-091-1/+13
| | | set the reverse dependency lookup to use it.
* Add --binpkgs-missing option to equery list to print installed packages thatfuzzyray2010-09-231-1/+21
| | | | | | do not have a corresponding binary package built. svn path=/trunk/gentoolkit/; revision=815
* Merge genscripts rev 406fuzzyray2010-03-241-28/+4
| | | | svn path=/trunk/gentoolkit/; revision=756
* Update to genscripts rev 382. This has more fixes for py3k and the modular ↵fuzzyray2010-03-121-5/+12
| | | | | | rewrite of eclean. svn path=/trunk/gentoolkit/; revision=755
* sync with genscripts rev 343. This adds the initial py3k support and the ↵fuzzyray2010-03-091-287/+54
| | | | | | analyse utility to gentoolkit svn path=/trunk/gentoolkit/; revision=751
* Merge genscripts revision 191fuzzyray2010-02-021-2/+2
| | | | svn path=/trunk/gentoolkit/; revision=737
* Update Copyright date headersfuzzyray2010-01-071-1/+1
| | | | svn path=/trunk/gentoolkit/; revision=731
* Merge genscripts rev 130fuzzyray2009-12-111-17/+8
| | | | svn path=/trunk/gentoolkit/; revision=721
* Merge rev 113 from djanderson's genscripts repofuzzyray2009-12-081-144/+699
| | | | svn path=/trunk/gentoolkit/; revision=703
* Apply updates from genscripts repofuzzyray2009-06-031-5/+6
| | | | svn path=/trunk/gentoolkit/; revision=659
* Rearrange trunk to support gentoolkit version 0.3. Split into gentoolkit, ↵fuzzyray2009-05-051-0/+162
gentoolkit-dev, and deprecated. Import djanderson's work on the gentoolkit library and equery svn path=/trunk/gentoolkit/; revision=589