<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/gitlab.git/gitlab/base.py, branch jlvillal/project_groups</title>
<subtitle>github.com: gpocentek/python-gitlab.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitlab.git/'/>
<entry>
<title>chore: fix issue with adding type-hints to 'manager' attribute</title>
<updated>2021-11-22T06:37:56+00:00</updated>
<author>
<name>John L. Villalovos</name>
<email>john@sodarock.com</email>
</author>
<published>2021-11-22T06:35:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitlab.git/commit/?id=9a451a892d37e0857af5c82c31a96d68ac161738'/>
<id>9a451a892d37e0857af5c82c31a96d68ac161738</id>
<content type='text'>
When attempting to add type-hints to the the 'manager' attribute into
a RESTObject derived class it would break things.

This was because our auto-manager creation code would automatically
add the specified annotated manager to the 'manager' attribute. This
breaks things.

Now check in our auto-manager creation if our attribute is called
'manager'. If so we ignore it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When attempting to add type-hints to the the 'manager' attribute into
a RESTObject derived class it would break things.

This was because our auto-manager creation code would automatically
add the specified annotated manager to the 'manager' attribute. This
breaks things.

Now check in our auto-manager creation if our attribute is called
'manager'. If so we ignore it.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: use new-style formatting for named placeholders</title>
<updated>2021-11-08T22:11:40+00:00</updated>
<author>
<name>Nejc Habjan</name>
<email>hab.nejc@gmail.com</email>
</author>
<published>2021-11-05T20:01:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitlab.git/commit/?id=c0d881064f7c90f6a510db483990776ceb17b9bd'/>
<id>c0d881064f7c90f6a510db483990776ceb17b9bd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: use f-strings for string formatting</title>
<updated>2021-11-06T03:45:01+00:00</updated>
<author>
<name>Nejc Habjan</name>
<email>hab.nejc@gmail.com</email>
</author>
<published>2021-11-01T18:22:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitlab.git/commit/?id=7925c902d15f20abaecdb07af213f79dad91355b'/>
<id>7925c902d15f20abaecdb07af213f79dad91355b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: fix a few typos</title>
<updated>2021-09-18T20:34:18+00:00</updated>
<author>
<name>Tim Gates</name>
<email>tim.gates@iress.com</email>
</author>
<published>2021-09-15T22:24:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitlab.git/commit/?id=7ea4ddc4248e314998fd27eea17c6667f5214d1d'/>
<id>7ea4ddc4248e314998fd27eea17c6667f5214d1d</id>
<content type='text'>
There are small typos in:
- docs/gl_objects/deploy_tokens.rst
- gitlab/base.py
- gitlab/mixins.py
- gitlab/v4/objects/features.py
- gitlab/v4/objects/groups.py
- gitlab/v4/objects/packages.py
- gitlab/v4/objects/projects.py
- gitlab/v4/objects/sidekiq.py
- gitlab/v4/objects/todos.py

Fixes:
- Should read `treatment` rather than `reatment`.
- Should read `transferred` rather than `transfered`.
- Should read `registered` rather than `registred`.
- Should read `occurred` rather than `occured`.
- Should read `overridden` rather than `overriden`.
- Should read `marked` rather than `maked`.
- Should read `instantiate` rather than `instanciate`.
- Should read `function` rather than `fonction`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are small typos in:
- docs/gl_objects/deploy_tokens.rst
- gitlab/base.py
- gitlab/mixins.py
- gitlab/v4/objects/features.py
- gitlab/v4/objects/groups.py
- gitlab/v4/objects/packages.py
- gitlab/v4/objects/projects.py
- gitlab/v4/objects/sidekiq.py
- gitlab/v4/objects/todos.py

Fixes:
- Should read `treatment` rather than `reatment`.
- Should read `transferred` rather than `transfered`.
- Should read `registered` rather than `registred`.
- Should read `occurred` rather than `occured`.
- Should read `overridden` rather than `overriden`.
- Should read `marked` rather than `maked`.
- Should read `instantiate` rather than `instanciate`.
- Should read `function` rather than `fonction`.
</pre>
</div>
</content>
</entry>
<entry>
<title>chore: convert to using type-annotations for managers</title>
<updated>2021-09-08T14:18:48+00:00</updated>
<author>
<name>John L. Villalovos</name>
<email>john@sodarock.com</email>
</author>
<published>2021-06-13T21:40:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitlab.git/commit/?id=d8de4dc373dc608be6cf6ba14a2acc7efd3fa7a7'/>
<id>d8de4dc373dc608be6cf6ba14a2acc7efd3fa7a7</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>chore: improve type-hinting for managers</title>
<updated>2021-09-07T15:19:39+00:00</updated>
<author>
<name>John L. Villalovos</name>
<email>john@sodarock.com</email>
</author>
<published>2021-06-12T22:05:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitlab.git/commit/?id=c9b5d3bac8f7c1f779dd57653f718dd0fac4db4b'/>
<id>c9b5d3bac8f7c1f779dd57653f718dd0fac4db4b</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: catch invalid type used to initialize RESTObject</title>
<updated>2021-06-10T14:39:58+00:00</updated>
<author>
<name>John L. Villalovos</name>
<email>john@sodarock.com</email>
</author>
<published>2021-05-31T17:47:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitlab.git/commit/?id=c7bcc25a361f9df440f9c972672e5eec3b057625'/>
<id>c7bcc25a361f9df440f9c972672e5eec3b057625</id>
<content type='text'>
Sometimes we have errors where we don't get a dictionary passed to
RESTObject.__init__() method. This breaks things but in confusing
ways.

Check in the __init__() method and raise an exception if it occurs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sometimes we have errors where we don't get a dictionary passed to
RESTObject.__init__() method. This breaks things but in confusing
ways.

Check in the __init__() method and raise an exception if it occurs.
</pre>
</div>
</content>
</entry>
<entry>
<title>chore: fix import ordering using isort</title>
<updated>2021-05-25T18:54:51+00:00</updated>
<author>
<name>John L. Villalovos</name>
<email>john@sodarock.com</email>
</author>
<published>2021-05-22T15:55:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitlab.git/commit/?id=f3afd34260d681bbeec974b67012b90d407b7014'/>
<id>f3afd34260d681bbeec974b67012b90d407b7014</id>
<content type='text'>
Fix the import ordering using isort.

https://pycqa.github.io/isort/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the import ordering using isort.

https://pycqa.github.io/isort/
</pre>
</div>
</content>
</entry>
<entry>
<title>chore: mypy: Disallow untyped definitions</title>
<updated>2021-04-28T04:04:58+00:00</updated>
<author>
<name>John L. Villalovos</name>
<email>john@sodarock.com</email>
</author>
<published>2021-04-18T19:06:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitlab.git/commit/?id=6aef2dadf715e601ae9c302be0ad9958345a97f2'/>
<id>6aef2dadf715e601ae9c302be0ad9958345a97f2</id>
<content type='text'>
Be more strict and don't allow untyped definitions on the files we
check.

Also this adds type-hints for two of the decorators so that now
functions/methods decorated by them will have their types be revealed
correctly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Be more strict and don't allow untyped definitions on the files we
check.

Also this adds type-hints for two of the decorators so that now
functions/methods decorated by them will have their types be revealed
correctly.
</pre>
</div>
</content>
</entry>
<entry>
<title>chore: make RESTObject._short_print_attrs always present</title>
<updated>2021-04-24T19:10:59+00:00</updated>
<author>
<name>John L. Villalovos</name>
<email>john@sodarock.com</email>
</author>
<published>2021-04-24T19:10:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitlab.git/commit/?id=6d551208f4bc68d091a16323ae0d267fbb6003b6'/>
<id>6d551208f4bc68d091a16323ae0d267fbb6003b6</id>
<content type='text'>
Always create RESTObject._short_print_attrs with a default value of
None.

This way we don't need to use hasattr() and we will know the type of
the attribute.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Always create RESTObject._short_print_attrs with a default value of
None.

This way we don't need to use hasattr() and we will know the type of
the attribute.
</pre>
</div>
</content>
</entry>
</feed>
