summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects/users.py
Commit message (Collapse)AuthorAgeFilesLines
* docs: use annotations for return typesdocs/sphinx-annotationsNejc Habjan2021-12-011-7/+7
|
* docs: only use type annotations for documentationNejc Habjan2021-11-281-4/+4
|
* chore: ensure get() methods have correct type-hintsjlvillal/mypy_ensure_type_hintsJohn L. Villalovos2021-11-151-0/+31
| | | | | | | | Fix classes which don't have correct 'get()' methods for classes derived from GetMixin. Add a unit test which verifies that classes have the correct return type in their 'get()' method.
* refactor: use new-style formatting for named placeholdersNejc Habjan2021-11-081-12/+12
|
* refactor: use f-strings for string formattingNejc Habjan2021-11-051-8/+8
|
* feat(objects): list starred projects of a userNejc Habjan2021-10-141-0/+34
|
* Merge pull request #1515 from JohnVillalovos/jlvillal/mypy_v4_obj_usersNejc Habjan2021-10-061-8/+15
|\ | | | | chore: add type-hints to gitlab/v4/objects/users.py
| * chore: add type-hints to gitlab/v4/objects/users.pyJohn L. Villalovos2021-09-071-8/+15
| | | | | | | | Adding type-hints to gitlab/v4/objects/users.py
* | feat(objects): support Create and Revoke personal access token APINejc Habjan2021-09-131-0/+2
| |
* | chore: convert to using type-annotations for managersJohn L. Villalovos2021-09-081-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Convert our manager usage to be done via type annotations. Now to define a manager to be used in a RESTObject subclass can simply do: class ExampleClass(CRUDMixin, RESTObject): my_manager: MyManager Any type-annotation that annotates it to be of type *Manager (with the exception of RESTManager) will cause the manager to be created on the object.
* | chore: improve type-hinting for managersJohn L. Villalovos2021-09-071-2/+20
|/ | | | | | | | | | | | | | | The 'managers' are dynamically created. This unfortunately means that we don't have any type-hints for them and so editors which understand type-hints won't know that they are valid attributes. * Add the type-hints for the managers we define. * Add a unit test that makes sure that the type-hints and the '_managers' attribute are kept in sync with each other. * Add unit test that makes sure specified managers in '_managers' have a name ending in 'Managers' to keep with current convention. * Make RESTObject._managers always present with a default value of None. * Fix a type-issue revealed now that mypy knows what the type is
* chore: fix import ordering using isortJohn L. Villalovos2021-05-251-3/+3
| | | | | | Fix the import ordering using isort. https://pycqa.github.io/isort/
* fix(objects): allow lists for filters for in all objectsfix/missing-list-attributesNejc Habjan2021-04-271-1/+2
|
* chore: fix F401 errors reported by flake8John L. Villalovos2021-04-181-2/+2
| | | | | | F401: Module imported but unused https://www.flake8rules.com/rules/F401.html
* chore: have _create_attrs & _update_attrs be a namedtupleJohn L. Villalovos2021-04-171-18/+19
| | | | | | Convert _create_attrs and _update_attrs to use a NamedTuple (RequiredOptional) to help with code readability. Update all code to use the NamedTuple.
* Merge pull request #1333 from python-gitlab/feat/user-follow-apiNejc Habjan2021-02-281-0/+50
|\ | | | | feat(users): add follow/unfollow API
| * feat(users): add follow/unfollow APIfeat/user-follow-apiMax Wittig2021-02-271-0/+50
| |
* | fix: remove duplicate class definitions in v4/objects/users.pyJohn L. Villalovos2021-02-251-12/+0
| | | | | | | | | | The classes UserStatus and UserStatusManager were each declared twice. Remove the duplicate declarations.
* | chore: remove usage of 'from ... import *'John L. Villalovos2021-02-231-2/+13
|/ | | | | | | | | | | | | | | | | | In gitlab/v4/objects/*.py remove usage of: * from gitlab.base import * * from gitlab.mixins import * Change them to: * from gitlab.base import CLASS_NAME * from gitlab.mixins import CLASS_NAME Programmatically update code to explicitly import needed classes only. After the change the output of: $ flake8 gitlab/v4/objects/*py | grep 'REST\|Mixin' Is empty. Before many messages about unable to determine if it was a valid name.
* refactor(api): explicitly export classes for star importsrefactor/split-objectsNejc Habjan2021-02-071-0/+37
|
* refactor(v4): split objects and managers per API resourceNejc Habjan2021-02-071-0/+419